<html><head></head><body><div class="ydpf2b130e0yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div><div>Mariel</div><div><br></div><div>This is my understanding: when pgpool is started, it creates num_init_children (it is a config) background processes. You can see that with ps -ef. So for example, if num_init_children is 3, it will start 3 of those processes.</div><div><br></div><div>The first connection to [pguser1,pgdb1] will use the first process.</div><div><span><div>The second connection to [pguser1,pgdb1] will use the second process.</div></span><div><span><div>The third connection, this time to [pguser2,pgdb2] will use the third process</div></span></div><div><br><span></span></div><div>Now if you have a connection to [pguser2,pgdb2] again, the pool (the pool of pgpool's processes) is full but it can still connect if max_pool is not set to 1</div><div><br></div><div>I think this is the idea (not sure). So pgpool is not really doing connection pooling, it is more connection caching. Once a process holds a connection, this connection is never used by another process, it is only when the process disconnects from postgres that the pgpool background process becomes available in the "pool".<br></div><div><br></div><div>The important point to remember is the parameter num_init_children: if it is too low, connections attempts will be queued (no error) and then of course performance will be very bad. I think everybody has been hit by this problem...<br></div><div><br></div><div>I don't think pgpool should impact the performance, it would be interesting to analyze your test and understand why pgpool is doing worst than without pgpool. Maybe look in the postgres log which statements are slow ?<br></div></div><div><br></div><div><br></div><div class="ydpf2b130e0signature">Pierre</div></div>
        <div><br></div><div><br></div>
        
        </div><div id="ydp89ee6570yahoo_quoted_5607229186" class="ydp89ee6570yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Thursday, December 13, 2018, 3:01:14 PM GMT+1, Mariel Cherkassky &lt;mariel.cherkassky@gmail.com&gt; wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="ydp89ee6570yiv5323918479"><div><div dir="rtl"><div dir="ltr">someone ?</div></div><br clear="none"><div class="ydp89ee6570yiv5323918479gmail_quote"><div dir="rtl">‫בתאריך יום א׳, 9 בדצמ׳ 2018 ב-15:00 מאת ‪Mariel Cherkassky‬‏ &lt;‪<a shape="rect" href="mailto:mariel.cherkassky@gmail.com" rel="nofollow" target="_blank">mariel.cherkassky@gmail.com</a>‬‏&gt;:‬<br clear="none"></div><div class="ydp89ee6570yiv5323918479yqt3486589964" id="ydp89ee6570yiv5323918479yqt00037"><blockquote class="ydp89ee6570yiv5323918479gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div dir="rtl"><div dir="ltr">Hi,</div><div dir="ltr">I'm trying to implement pgpool2 in our environment but in our performance tests it seems that when we use pgpool the performance are worse. Therefore, I wanted to check if pgpool is the right solution based on the next info that I read :&nbsp;</div><div dir="ltr">"<span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;">&nbsp;</span><span style="color:rgb(37,37,37);font-family:sans-serif;font-size:14px;">process opens a new backend connection only if the requested [user,database] pair is not already in the cache. So if the application uses only one user to connect to only one database, say [pguser1,pgdb1], then each child will continue to reuse the first connection and will never open a second connection, so in effect pgpool will open no more than 100 backend connections even though max_pool is set to 3."</span></div><div dir="ltr"><br clear="none"></div><div dir="ltr">In my case, I have 3 databases and for every database I have a dedicated user. The application access each of those databases with a dedicated user. Now basicaly, if my max_connections is set to 500, pgpool max_pool set to 3 and the num_of_init_children is set to 100 it means that at every moment I can have at most 100 sessions to each one of the&nbsp; databases (with pgpool..).</div><div dir="ltr"><br clear="none"></div><div dir="ltr">Thanks , Mariel.</div></div>
</blockquote></div></div></div></div><div class="ydp89ee6570yqt3486589964" id="ydp89ee6570yqt86474">_______________________________________________<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><br clear="none"></div></div>
            </div>
        </div></body></html>