<div dir="ltr"><i>num_init_children</i> configuration parameter is used to specify how many child processes pgpool-II should spawn to handle client connections. Since one pgpool-II child can handle one client connection at a time, so at any time pgpool-II can handle a maximum num_init_children number of concurrent connections.<br><br>As far as for the <i>max_pool</i> parameter, It configures how many different connections to cache per pgpool-II child. A client connection is identified by a user and a database pair,  So the pgpool-II child process opens a new backend connection only if the requested [user, database] pair is not already in the cache of the pgpool-II child accepting that client connection. And if the application uses only one user to connect to only one database, then each child will continue to reuse the first cached connection and will never open a second connection. But if the client uses more than one pair of user and database, then each child can cache up to a max_pool number of different client connection.<br><br>So keeping in mind the above, relation between num_init_children, max_pool and PostgreSQL&#39;s max_connections is as follows.<br><br>The max_connection setting for PostgreSQL, should satisfy the condition, max_pool times num_init_children in pgpool-II should be less than or equal to PostgreSQL max_connectiopn minus PostgreSQL superuser_reserved_connections.<div><br><i><b>(max_pool*num_init_children) &lt;= (max_connections - superuser_reserved_connections)  </b></i><br><br>Thanks<br>Best regards<br>Muhammad Usama<br><br><br><br><br><br><br><br><br>On Tue, Dec 22, 2015 at 6:10 PM, &lt;<a href="mailto:aegir@free.fr">aegir@free.fr</a>&gt; wrote:<br>&gt;<br>&gt; Hello,<br>&gt;<br>&gt; Something doesn&#39;t sound clear to me with pgPool configuration.<br>&gt;<br>&gt; Let&#39;s say it&#39;s configured with :<br>&gt;<br>&gt; num_init_children = 2<br>&gt; and<br>&gt; max_pool = 4<br>&gt;<br>&gt; while the postmasters are configured with max_connections=10<br>&gt;<br>&gt; How many &quot;psql  -p 9999 -U user_1 DB_1&quot; could I run from terminals without beig blocked ? 2, 8 or 10 ?<br>&gt;<br>&gt; IMHO, according the available documentation I should&#39;nt be blocked because as I use always same user/db pgPool is supposed to reuse always the same connection in each child pool, so the 11th concurrent connexion should be rejected (not blocked) due to the max_connections limit.<br>&gt;<br>&gt; But by running some tests, it seems that the 3rd connection is blocked.<br>&gt;<br>&gt; Could you please give me any clue about the expected behaviour ?<br>&gt;<br>&gt; Thank you.<br>&gt; _______________________________________________<br>&gt; pgpool-general mailing list<br>&gt; <a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>&gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-general">http://www.pgpool.net/mailman/listinfo/pgpool-general</a></div></div>