Re: Built-in connection pooling - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Built-in connection pooling
Date
Msg-id CAFj8pRBbJJttkANAxsZ3OKKEBD-b208g_-GGrj6t-_uro-MkeA@mail.gmail.com
Whole thread Raw
In response to Re: Built-in connection pooling  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Responses Re: Built-in connection pooling
List pgsql-hackers


When I've been thinking about adding a built-in connection pool, my
rough plan was mostly "bgworker doing something like pgbouncer" (that
is, listening on a separate port and proxying everything to regular
backends). Obviously, that has pros and cons, and probably would not
work serve the threading use case well.

And we will get the same problem as with pgbouncer: one process will not be able to handle all connections...
Certainly it is possible to start several such scheduling bgworkers... But in any case it is more efficient to multiplex session in backend themselves.

pgbouncer hold all time client connect. When we implement the listeners, then all work can be done by worker processes not by listeners.

Regards

Pavel


But it would have some features that I find valuable - for example, it's
trivial to decide which connection requests may or may not be served
from a pool (by connection to the main port or pool port).

That is not to say the bgworker approach is better than what you're
proposing, but I wonder if that would be possible with your approach.


regards


--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall