[pgpool-general: 70] num_int_children and max_pool

Mario Splivalo mario.splivalo at megafon.hr
Fri Dec 9 00:57:26 JST 2011


I'm using pgpoolII-3.1.1. The documentation states that
num_init_children is the maximum number of 'active' connections from
clients to the pgpool instance. It also states that 2*num_init_children
can be queued.

So, I set up num_init_children to 2, and had two psql shells connected
to postgres. Then I started another 4 psql shells, and those were
waiting for connection (I don't even get a password prompt), as
excpected. But I also expected that any subsequent connections attempts
would result in 'connection refused'. I was able to 'queue' over 50
connectins, way over 'num_init_children*2'.

Now, is there a way to tell pgpool to stop accepting connections after
certain limit? I need pgpool to reject connections.

Also, I'm not sure what should I set max_pool to. If I allow 1000
connections to pgpool, and set max_pool to 5, I actually need to allow
postgres to accept 5000 connections to be sure that everything will be
working ok. And then when that 1000 connections disconnect from pgpool,
pgpool will still maintain 5000 connections to the postgres backend, no
matter that the most I'll be able to utilize is 1/5 of those.

Am I missing something here?

	Mario


More information about the pgpool-general mailing list