The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/16/tutorial-arch.html Description:
PostgreSQL uses a client/server architecture. 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. A PostgreSQL database, in a broader sense, consists of the following cooperating processes (programs): • A PostgreSQL instance process that manages a collection of databases also known as Postgres Cluster. A Postgres Cluster is stored at a common file system location (the “data area”). More than one PostgreSQL instance can be initiated on a single system as long as they use different data areas and different communication ports. • A Client Process initiates a connection (or session) for the PostgreSQL instance. Client applications can be very diverse in nature. A Postgres Client could be a text-oriented tool, a graphical application, a web server that accesses the PostgreSQL as a backend database, or a specialized database maintenance tool. • A Server Process initiated by the PostgreSQL instance as soon as a Postgres Client sends a connection request. The PostgreSQL instance can handle multiple such connection requests concurrently, originating from various Postgres Client processes that are running on a single or multiple hosts. To achieve this, the PostgreSQL instance initiates (forks) a new Server Process for every new connection request coming from a Postgres Client. The Server Process accepts the connection request and after authentication, performs database actions on behalf of the corresponding Postgres Client while interacting with the PostgreSQL instance. In other words, after establishing the connection with one of the Server Processes, the Postgres Client sends requests to the Server Process while the Server Process listens to these requests and returns responses accordingly. Once a connection is established, the Postgres Client and the Server Process can communicate with each other without directly intervening with the PostgreSQL instance. Note that, the PostgreSQL instance is always running and waiting to accept any new client connection requests coming from Postgres Clients, whereas the Postgres Client and associated Server Process come and go.