Forgive me, I'm still a bit confused by how max_pool works with 
num_init_children.  First you said that at most I can have 32 clients sending 
queries, but then you said that each process can handle 4 different 
connections... so does this mean that I can have 128 connections from pgpool to 
my postgresql database?

Sorry, not quite understanding.

On 10/07/2011 02:05 PM, Guillaume Lelarge wrote:
On Fri, 2011-10-07 at 13:51 -0400, Brandon Phelps wrote:
So we decided to go with pgpool-II.  The documentation is a little lacking for 
pgpool-II so I have one question:

How are connections handled once the default levels are reached?  Here are my 
pgpool settings:

num_init_children = 32
max_pool = 4


This configuration means you can have at most 32 clients sending queries
at the same time to PostgreSQL via pgpool. With a max_pool of 4, each
pgpool process can handle four different connections to the same server:
they could differ either by the database name or by the user name.

This creates 32 child processes when we start pgpool which I understand.  Each 
time I browse to a page from our web app and do a netstat -an on the web server 
(running pgpool) I see an additional connection to the database server, which 
looks good.  I assume that once 32 connections are opened at once then pgpool 
will start re-using them, based on the num_init_children * max_pool... But 
since 32 * 4 = 128, what will happen on the 129th connection?  Will a new child 
get created, allowing for 4 more connections (1 * max_pool), or will that 
connection be denied?


Connection is not denied (that would be the behaviour of PostgreSQL).
Connection is on hold waiting for a pgpool process to be available.
Meaning you don't want long connections.



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to