Process Architecture
- fatima raza
- Jan 27, 2023
- 1 min read
PostgreSQL is client/server RDMS with multi-process architecture and runs on single host. PostgreSQL Server: collection of multiple processes collectively managing one database cluster and it contains following types of processes 1)postgres server process (parent of all processes related to DB cluster management)
In earlier versions it is called "postmaster"
It starts up with "pg_ctl" utility with start option
then it allocates shared memory area in memory
starts various background processes
starts replication associated processes and background worker processes if necessary
waits for connection requests from clients and starts background process whenever connection request is recieved
Listens to one network port and default is 5432
2)backend processes (handles all queries and statements)
also called "postgres"
started by postgres server process
handles all queries issued by clients
communicate with client by a single TCP Connection
terminates when client gets disconnected
It allow only one database so have to specify database explicitly
postgreSQL allow multiple clients to connect and "max_connections" controls the maximum number of the clients
default is 100

3)background process (performs fearture of VACUUM and CHECKPOINT processes) 4)replication associated processes (perform streaming replication) 5)background worker process (perform any processing implemented by users) Memory Architecture: Local Memory Area
allocated by each backend process
each area is divided into several sub-areas whos size either fixed or variable
Shared Memory Area
allocated by postgreSQL server when it starts up
that area is also divided into several fix sized sub-areas
Comments