<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br>On Jan 16, 2014, at 4:25 AM, Tatsuo Ishii &lt;<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&gt; wrote:<br><br><blockquote type="cite"><blockquote type="cite">Hi!<br><br>It seems I ran into another problem.<br><br>I have pgpool 3.3.1 with 2 postgresql 9.3 backends with streaming replication. I'm trying to set the correct number of allowed connections.<br><br>These are settings from postgresl.conf on both postgresql backends:<br><br>max_connections &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 30<br>superuser_reserved_connections = 3<br><br><br>These are settings from pgpool.conf:<br><br>num_init_children &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 25<br>max_pool &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 2<br><br>I set these values according to the following formula:<br><br>max_pool*num_init_children &lt;= (max_connections - superuser_reserved_connections)&nbsp;<br><br>2 * 25 &lt;= ( 30 - 3 )*2<br></blockquote><br>Where does the caliculation come from?<br>Isn't that should be:<br><br>2 * 25 &lt;= ( 30 - 3 )<br><br>and it is going to be false.<br></blockquote><br>It seems I misunderstood this formula :)&nbsp;<br><br>I have 2 backends. Each can handle 27 connections. So I want pgpool to be able to handle 27*2 connections.&nbsp;<br><br><br>If I use&nbsp;<br><br>13 * 2 &lt;= (30 -3 )&nbsp;<br><br>then the total number of connections won't exceed 26. Is that correct?&nbsp;<br><br><br><br></body></html>