Skip to main content
InterviewHubPRO
Section Overview
Q1

Question 1 of 50

Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

2%
PostgreSQL Enterprise (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

What is PostgreSQL and how does its process architecture work?

senior LevelCode ExampleSystem DesignDatabases & SQLPostgreSQL

In Simple Words: PostgreSQL is a powerful, open-source object-relational database management system (ORDBMS):

  • Process-per-Connection Model: Unlike MySQL or SQL Server which use threads, PostgreSQL forks a separate operating system process (postgres backend process) for every connected client!
  • Postmaster Process: The main supervisor daemon that listens on port 5432, accepts incoming TCP client connections, and forks backend worker processes.
  • Shared Memory: All backend processes share access to a common block of shared memory (Shared Buffers, WAL buffers, lock tables).
text
PostgreSQL Process Architecture:
[Client 1] ──► [Backend Process 1 (Forked)] ──┐
[Client 2] ──► [Backend Process 2 (Forked)] ──┼─► [Shared Memory: Shared Buffers & Locks]
                                              │
[Postmaster (Port 5432)] ─────────────────────┘