When a client attempts a connection to a PostgreSQL database, the postmaster acknowledges the connections and forks a backend process. Thus, each client connection in Postgres is a process in the operating system. The postmaster performs a fork() system call, which creates an address space, file descriptors, and a copy of the memory segments as of the postmaster process. And once the client disconnects, the child process gets terminated.
In a general workload, benchmarks have proven that PostgreSQL performs well up to 350 transactions per second, without a connection pooler. However, when we expect more transactions that could create hundreds or thousands of processes, it is important to maintain a connection pooler.
A connection pooler will help to maintain persistent connections to the database server. This avoids creating and terminating...