[pgpool-general: 5577] Re: Postgresql nodes number and num_init_children*max_pool

Pierre Timmermans ptim007 at yahoo.com
Tue Jun 13 03:12:42 JST 2017

Hi Brice
You can find at least 2 threads related to max_pool during the last month, I had myself difficulties to understand it. 

Basically, num_init_children = 48 means that you can have at most 48 concurrent active connections to pgpool. So once 48 connections are established, the following one will be queues. You can experiment with a very low setting of num_init_children to verify this.
If everyone connects with the same username/database then those 48 processes will correspond to 48 postgres backend connections. However if there are multiple username/database combinations, then the max_pool parameter comes into play and you can possibly have more than 48 postgres backend processes (but the maximum concurrent connections remain 48, i.e. the number of pgpool processes). 
Again you have to look at the view pg_stat_activity and check the output of the ps command on your db servers to verify this, it is not very intuitive to get it from the documentation.

On Monday, June 12, 2017, 11:21:50 AM GMT+2, Brice CHAPPE <bricechappe at gmail.com> wrote:

Hi all,


I would want to confirm if my configuration is fine.

In the manual you said that “Number of connections to each PostgreSQL is roughly max_pool*num_init_children”

I have 4 postgresql nodes behind pgpool. 1 master and 3 slaves (cluster managed by repmgr)

Each node has 16 cores and 64GB memory.

So I set on each postgresql node max_connections to 200 and set num_init_children=48 and max_pool to 4 in pgpool configuration.

48*4 = 192 connections 

My question is : pgpool is capable to open 192 connections on each postgresql instance or just totally 192 connections on all nodes ?

Or I have to upgrade the num_ini_children value ?


Thanks !




pgpool-general mailing list
pgpool-general at pgpool.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20170612/46905509/attachment-0001.html>

More information about the pgpool-general mailing list