Search code examples
postgresqltcpserverclientdatabase-connection

What does it mean for a client and server to communicate *without intervention* via the Postgres process


I'm reading the Postgres documentation right now and came across this line in architecture fundamentals:

From that point on, the client and the new server process communicate without intervention by the original postgres process.

This is followed by

Thus, the master server process 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. We only mention it here for completeness.)

My question: is there a counter example, or just plain ole example of what it would mean for communication to occur between the two with "intervention"? Do other databases communicate differently, i.e. indirectly/via some commonly known proxies?


Solution

  • PostgreSQL's process architecture is pretty standard for such purposes, so yes, other databases will do it in a similar fashion.

    When a new connection is established, a server process is forked that authenticates the client and does the work for the database session. The main difference will probably be that some systems prefer to use multithreading, while others (like PostgreSQL) prefer multiprocessing. This mostly influences how the processes communicate.

    As an example, in Oracle database the equivalent to the “postmaster” process would be the “listener”, which forks a server process.