Contents / Previous / Next


DB Server Client Architecture

PostgreSQL uses a client/server model. A server process, which manages the database files, accepts connections to the database from client applications, and performs actions on the database on behalf of the clients.
The database serverprogram is called postmaster.

Client applications can be very diverse in nature:
They could be a text-oriented tool, a graphical application, a web server that accesses the database to display web pages, or a specialized database maintenance tool. The psql client is supplied with the PostgreSQL distribution.

As is typical of client/server applications, the client and the server can be on different hosts. In that case they communicate over a TCP/IP network connection.

The PostgreSQL server can handle multiple concurrent connections from clients. For that purpose it starts ("forks") a new process for each connection. From that point on, the client and the new server process communicate without intervention by the original postmaster process. Thus, the postmaster is always running, waiting for client connections, whereas client and associated server processes come and go.
(All of this is of course invisible to the user.)