<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:medium;"><div><div>Piotr,</div><div><br></div><div>Thank you. Finally I got the point.. so it is really num_init_children that limit the number of concurrent connections that are possible.&nbsp;</div><div><br></div><div>max_pool can only have an impact on the number of postgres connections initiated by pgpool. So in my test case, with num_init_children to 1 and max_pool to 4, I can have only one connection active but if I log in and out with different users I see indeed that more postgres backend connections are created.</div><div><br></div><div>In my use case we are going to have a lot of micro-services each connecting to their own schema, so the max_pool can be useful.</div><div><br></div><div>Thanks again and regards,</div><div><br></div><div>Pierre</div><div><br></div></div><div><br></div><div id="ydp6d5edb1dyahoo_quoted_5735609984" class="ydp6d5edb1dyahoo_quoted"><div>On Wednesday, May 17, 2017, 10:45:35 AM GMT+2, Piotr Gbyliczek &lt;P.Gbyliczek@node4.co.uk&gt; wrote:</div><div><div id="ydp6d5edb1dyiv2190580244"><div>
    <br clear="none">
    <br clear="none">

<table width="800" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td colspan="8" rowspan="1" valign="top"><table width="800" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td colspan="8" rowspan="1" valign="top"><table width="800" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td colspan="1" rowspan="2" valign="top" width="40"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td colspan="1" rowspan="1"><img border="0" src="cid:GAyDh9Safcpilb3szr9m"></td></tr></tbody></table></td><td colspan="1" rowspan="2" width="9">&nbsp;</td><td colspan="1" rowspan="1" valign="top" width="480">
<span style="font-size:20px;font-weight:bold;font-family:Arial;margin:0;padding:0;">Piotr Gbyliczek</span>
                  <hr style="border-top: 1px solid rgb(224, 82, 6); color: rgb(224, 82, 6); margin: 4px 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; min-height: 0px;">
                  <span style="font-weight:lighter;font-size:14px;font-family:Arial;margin:0;padding:0;">Solutions Engineer</span>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td colspan="1" rowspan="1" height="4" style="font-size:4px;">&nbsp;</td></tr><tr><td colspan="1" rowspan="1" valign="top" width="56%">
                          <span style="font-size:11px;font-family:Arial;margin:0;padding:0;">
ddi. <strong>08454 210444</strong><br clear="none">

t. <strong>0845 123 2222</strong>
<br clear="none">e. <strong style="color: rgb(48, 58, 61);">P.Gbyliczek@node4.co.uk</strong></span>
</td><td align="left" colspan="1" rowspan="1" valign="top" width="44%"><span style="font-size:11px;font-family:Arial;margin:0;padding:0;"><strong>Nottingham Office</strong><br clear="none">Node4 Ltd, The POD,<br clear="none">10 Bottle Ln, Nottingham, NG1 2HL</span></td></tr></tbody></table>
                  <p>&nbsp;</p>
</td><td align="right" colspan="8" rowspan="1" valign="top">
<table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td colspan="1" rowspan="1"><a shape="rect" href="http://www.node4.co.uk" rel="nofollow" target="_blank"><img border="0" alt="Visit www.node4.co.uk" src="cid:lD6SrWu5OGySK5U6o0VR"></a></td></tr></tbody></table>
                  <table width="100%" height="46" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td colspan="8" rowspan="1" height="12" style="font-size:4px;"></td></tr><tr><td colspan="1" rowspan="1">&nbsp;</td><td align="right" colspan="1" rowspan="1"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td colspan="1" rowspan="1"><a shape="rect" href="http://www.node4.co.uk" rel="nofollow" target="_blank"><img border="0" alt="Visit www.node4.co.uk" src="cid:3jW32sSAtTlyLUzW8X0G"></a></td></tr></tbody></table></td><td colspan="1" rowspan="1">&nbsp;</td><td align="right" colspan="1" rowspan="1"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td colspan="1" rowspan="1"><a shape="rect" href="http://www.twitter.co.uk/Node4Ltd" rel="nofollow" target="_blank"><img border="0" alt="Visit Node4 on Twitter" src="cid:yvDksuHFpGhiXNi7ynGw"></a></td></tr></tbody></table></td><td colspan="1" rowspan="1">&nbsp;</td><td align="right" colspan="1" rowspan="1"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td colspan="1" rowspan="1"><a shape="rect" href="https://www.linkedin.com/company/node4-ltd" rel="nofollow" target="_blank"><img border="0" alt="Visit Node4 on Linkedin" src="cid:LUSvacu5FKUDWXWv6nv1"></a></td></tr></tbody></table></td><td colspan="1" rowspan="1">&nbsp;</td><td align="right" colspan="1" rowspan="1"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td colspan="1" rowspan="1"><a shape="rect" href="http://www.facebook.com/Node4" rel="nofollow" target="_blank"><img border="0" alt="Visit Node4 on Facebook" src="cid:jUdvrJSFwISw9RyMgDU3"></a></td></tr></tbody></table></td></tr></tbody></table>
                  <p>&nbsp;</p>
</td><td colspan="1" rowspan="2" width="10">&nbsp;</td><td colspan="1" rowspan="2" valign="top" width="40"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td colspan="1" rowspan="1"><img border="0" src="cid:GAyDh9Safcpilb3szr9m"></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>
<table width="800" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td colspan="1" rowspan="1">
<table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td colspan="1" rowspan="1"><a shape="rect" href="http://imago.circdata-solutions.co.uk/Microsites/RFG/publish/UC17/simplereg.aspx?utm_source=UC17NOD" rel="nofollow" target="_blank"><img border="0" alt="UCExpo - Visit us at Stand D104" src="cid:eDGnGo1YY8WdL5yy8hyC"></a></td></tr></tbody></table></td><td colspan="1" rowspan="1"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td colspan="1" rowspan="1"><a shape="rect" href="https://www.node4.co.uk/events/uc-expo-2017/" rel="nofollow" target="_blank"><img border="0" alt="MSC UCExpo - Book a Demo Slot" src="cid:pZwpnHvF0CjY4HMIk9Io"></a></td></tr></tbody></table>
</td></tr></tbody></table>
<p> </p>
</td></tr><tr><td colspan="8" rowspan="1">
    On Monday, 15 May 2017 18:58:45 BST Pierre Timmermans wrote:<br clear="none">
&gt; Hi,<br clear="none">
&gt; This question was asked recently (thread 5439) but I don't understand the<br clear="none">
&gt; answer (I cannot reply to this thread because I was not yet subscribed). So<br clear="none">
&gt; I still cannot understand when the  max_pool parameter is taken into<br clear="none">
&gt; consideration by pgpool Like in the initial question, I experimented with<br clear="none">
&gt; num_init_children=1 and max_pool=2 If I connect with userA, then obviously<br clear="none">
&gt; it works. Then, in another window, I connect with userB : but it hangs<br clear="none">
&gt; (until I disconnect userA). My understanding of max_pool was that each<br clear="none">
&gt; children could cache 2 connections, one for each database user.<br clear="none">
<br clear="none">
<br clear="none">
You are missing the fact that num_init_children limits your connections from <br clear="none">
client to pgpool. Each child can serve one connection in at the time.<br clear="none">
<br clear="none">
So, you have 2 connection pools to backend servers, but you only allow one <br clear="none">
connection to pgpool, making the second pool utterly pointless. <br clear="none">
<br clear="none">
Number of pools regulates how often the new connection will benefit from <br clear="none">
already open cached connection to backend, or in other words, how often it <br clear="none">
will suffer from the delay of new backend connections being established. <br clear="none">
<br clear="none">
For example, if you have an user connecting to 3 databases, then you have 3 <br clear="none">
distinctive user/database pairs. It would be best to set max_pool to 3. <br clear="none">
Setting it at 2 as above means that there is 33% chance that new connection <br clear="none">
will have to be established to backend servers (and it will be cached as such <br clear="none">
from that moment).<div class="ydp6d5edb1dyiv2190580244yqt2893372201" id="ydp6d5edb1dyiv2190580244yqtfd50160"><br clear="none">
<br clear="none">
Regards,</div><br clear="none">
Piotr<br clear="none">
-- <br clear="none">


<small style="font-family:Arial;color:#8E908F;">
<br clear="none">Node4 Limited is registered in England No: 04759927 and has its registered office at Millennium Way, Pride Park, Derby, DE24 8HZ<br clear="none">
The information contained in this email is confidential and is intended for the exclusive use of the email addressee shown.<br clear="none">
If you are not the addressee, any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited.<br clear="none">
If you have received this mail in error, please notify our mail manager at <a shape="rect" href="mailto:abuse@node4.co.uk" style="color: rgb(224, 82, 6);" rel="nofollow" target="_blank">abuse@node4.co.uk</a> and delete it from your system.<br clear="none">
Opinions expressed in this email are those of the individual not the company, unless specifically indicated to that effect.


</small><hr style="border-top: 1px solid rgb(209, 212, 211); margin: 4px 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; min-height: 0px;"><div class="ydp6d5edb1dyiv2190580244yqt2893372201" id="ydp6d5edb1dyiv2190580244yqtfd58156">

This email has been scanned by Node4's Email Security System.
</div><hr style="border-top: 1px solid rgb(209, 212, 211); margin: 4px 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; min-height: 0px;">
This email message has been delivered safely and archived online by Mimecast.
    
</td></tr></tbody></table><div class="ydp6d5edb1dyiv2190580244yqt2893372201" id="ydp6d5edb1dyiv2190580244yqtfd42831">
  
 

</div></div></div>_______________________________________________<br clear="none">pgpool-general mailing list<br clear="none"><a shape="rect" href="mailto:pgpool-general@pgpool.net" rel="nofollow" target="_blank">pgpool-general@pgpool.net</a><br clear="none"><a shape="rect" href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="nofollow" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><div class="ydp6d5edb1dyqt2893372201" id="ydp6d5edb1dyqtfd81070"><br clear="none"></div></div></div></div></body></html>