Re: Connection Pooling, a year later - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Connection Pooling, a year later
Date
Msg-id 8892.1008638219@sss.pgh.pa.us
Whole thread Raw
In response to Connection Pooling, a year later  (Michael Owens <owensmk@earthlink.net>)
List pgsql-hackers
Michael Owens <owensmk@earthlink.net> writes:
> Even if the descriptor passing were not the best (most portable) way to get 
> information from the client - postmaster to the backend, there still might be
> another way by which data from the client socket can be transmitted to a 
> backend, thereby allowing the data from multiple clients to be sent to a 
> single backend. For instance, the postmaster could accept() and also 
> multiplex (select()/poll(), or use kqueue on BSD) across all file 
> descriptors, sending and receiving data to/from the clients.

That would turn the postmaster into a performance bottleneck, since it
would have to do work for every client interaction.

Another objection is that the postmaster would need to have two open
file descriptors (the original client connection and a pipe to the
backend) for every active connection.  On systems with a fairly low
max-files-per-process setting (~ 50 is not uncommon) that would put
a serious crimp in the number of connections that could be supported.

On the whole it strikes me as more practical to do connection pooling
on the client side...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Michael Owens
Date:
Subject: Connection Pooling, a year later
Next
From: mlw
Date:
Subject: Re: Connection Pooling, a year later