<div dir="ltr">&gt; <span style="font-size:12.8px">Can you </span><span style="font-size:12.8px">identify the query which executed on the same time on pgpool2?</span><div><span style="font-size:12.8px">Well this is interesting. In the logs I see queries executed as:</span></div><div><span style="font-size:12.8px">1. [local] - Queries sent by Zabbix agent</span></div><div><span style="font-size:12.8px">2. Health checks from pgpool1, which is primary, using user postgres and database template1</span></div><div><span style="font-size:12.8px">3. SR checks using user postgres and database mydb.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">The processes in the list, however, show that username used for those connections is &#39;myuser&#39; and database is &#39;mydb&#39;. I found no entries with these values in PostgreSQL logfile.</span></div><div><span style="font-size:12.8px">I also checked pgpool-II log on pgpool1, the primary node, and found no queries sent to backend id 1, all of them are sent to backend 0, which is pgpool1.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Regards,</span></div><div><span style="font-size:12.8px">Vlad<br></span><div><span style="font-size:12.8px"><br></span></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 23, 2016 at 10:16 PM, Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok.<br>
<span class=""><br>
&gt; Start time   : 2016-08-23 21:23:54<br>
<br>
</span>This is the time when the pgpool process started. Since pgpool uses<br>
&quot;pre-fork&quot; method, in which all pgpool process are forked when pgpool<br>
starts. In summary, this is normal.<br>
<span class=""><br>
&gt; Creation time: 2016-08-23 23:01:21<br>
<br>
</span>This is the time when pgpool received a query from frontend and<br>
forwarded it to PostgreSQL (which I do not suppose to happen). Can you<br>
identify the query which executed on the same time on pgpool2?<br>
<span class=""><br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
<br>
</span><span class="">&gt; They are relevant:<br>
&gt;<br>
&gt; [vlad@pgpool2 ~]$ ps ax | grep postgres<br>
&gt;<br>
&gt; ...<br>
&gt;<br>
</span>&gt; *62230* ?        Ss     0:00 postgres: myuser mydb 192.168.241.101(39856)<br>
<span class="">&gt; idle<br>
&gt;<br>
&gt; ...<br>
&gt;<br>
&gt; [vlad@pgpool2 ~]$ pcp_proc_info -U postgres -w -h pgpool1 -v | grep -B7 -A1<br>
&gt; 62230<br>
&gt;<br>
&gt; Database     : mydb<br>
&gt;<br>
&gt; Username     : myuser<br>
&gt;<br>
&gt; Start time   : 2016-08-23 21:23:54<br>
&gt;<br>
&gt; Creation time: 2016-08-23 23:01:21<br>
&gt;<br>
&gt; Major        : 3<br>
&gt;<br>
&gt; Minor        : 0<br>
&gt;<br>
&gt; Counter      : 2<br>
&gt;<br>
</span>&gt; Backend PID  : *62230*<br>
<div class="HOEnZb"><div class="h5">&gt;<br>
&gt; Connected    : 1<br>
&gt;<br>
&gt;<br>
&gt;&gt;From what I understand, connected stands for the backend id (which is 1 in<br>
&gt; this case).<br>
&gt;<br>
&gt; On Tue, Aug 23, 2016 at 9:35 PM, Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; You can use pcp_proc_info command to check if the PostgreSQL process<br>
&gt;&gt; are relevant to Pgpool-II or not.<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://www.pgpool.net/docs/latest/pgpool-en.html#pcp_proc_info" rel="noreferrer" target="_blank">http://www.pgpool.net/docs/<wbr>latest/pgpool-en.html#pcp_<wbr>proc_info</a><br>
&gt;&gt;<br>
&gt;&gt; Best regards,<br>
&gt;&gt; --<br>
&gt;&gt; Tatsuo Ishii<br>
&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
&gt;&gt;<br>
&gt;&gt; &gt; Interesting thing, though, is that I see postgres processes being forked<br>
&gt;&gt; on<br>
&gt;&gt; &gt; pgpool2 eve though in the logs I see only the queries listed above.<br>
&gt;&gt; &gt; ...<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 65032 ?        Ss     0:00 *postgres*: myuser mydb 192.168.241.101(40278)<br>
&gt;&gt; &gt; idle<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 65033 ?        Ss     0:00 *postgres*: myuser mydb 192.168.241.101(40280)<br>
&gt;&gt; &gt; idle<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 65034 ?        Ss     0:00 *postgres*: myuser mydb 192.168.241.101(40282)<br>
&gt;&gt; &gt; idle<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 65035 ?        Ss     0:00 *postgres*: myuser mydb 192.168.241.101(40288)<br>
&gt;&gt; &gt; idle<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 65036 ?        Ss     0:00 *postgres*: myuser mydb 192.168.241.101(40290)<br>
&gt;&gt; &gt; idle<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; [vlad@pgpool2 ~]$ ps ax | grep postgres | grep myuser | wc -l<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 317<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Any ideas why can those processes be forked? It feels like pgpool creates<br>
&gt;&gt; &gt; slots just in case it needs to failover, but it&#39;s not documented anywhere<br>
&gt;&gt; &gt; and that&#39;s why it looks weird.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Tue, Aug 23, 2016 at 9:30 AM, Vlad Novikov &lt;<a href="mailto:xou.slackware@gmail.com">xou.slackware@gmail.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; Ok, looks like the connections I see on pgpool2 are just healthchecks<br>
&gt;&gt; and<br>
&gt;&gt; &gt;&gt; standard db SELECT calls:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; SELECT 1;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; SELECT class.relname, blocking_activity.client_addr,<br>
&gt;&gt; &gt;&gt; blocking_activity.query FROM  pg_catalog.pg_locks blocked JOIN<br>
&gt;&gt; &gt;&gt; pg_catalog.pg_stat_activity a ON a.pid=blocked.pid JOIN<br>
&gt;&gt; pg_catalog.pg_locks<br>
&gt;&gt; &gt;&gt; locks ON locks.locktype = blocked.locktype AND locks.DATABASE IS NOT<br>
&gt;&gt; &gt;&gt; DISTINCT FROM blocked.DATABASE AND locks.relation IS NOT DISTINCT FROM<br>
&gt;&gt; &gt;&gt; blocked.relation AND locks.page IS NOT DISTINCT FROM blocked.page AND<br>
&gt;&gt; &gt;&gt; locks.tuple IS NOT DISTINCT FROM blocked.tuple AND locks.virtualxid IS<br>
&gt;&gt; NOT<br>
&gt;&gt; &gt;&gt; DISTINCT FROM blocked.virtualxid AND locks.transactionid IS NOT DISTINCT<br>
&gt;&gt; &gt;&gt; FROM blocked.transactionid AND locks.classid IS NOT DISTINCT FROM<br>
&gt;&gt; &gt;&gt; blocked.classid AND locks.objid IS NOT DISTINCT FROM blocked.objid AND<br>
&gt;&gt; &gt;&gt; locks.objsubid IS NOT DISTINCT FROM blocked.objsubid AND locks.pid !=<br>
&gt;&gt; &gt;&gt; blocked.pid JOIN pg_catalog.pg_stat_activity blocking_activity ON<br>
&gt;&gt; &gt;&gt; blocking_activity.pid=locks.<wbr>pid JOIN pg_catalog.pg_class class ON<br>
&gt;&gt; &gt;&gt; class.oid=locks.relation WHERE NOT blocked.GRANTED;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I think we can consider this solved. Thank you, guys, for helping with<br>
&gt;&gt; &gt;&gt; this.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Regards,<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Vlad<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Mon, Aug 22, 2016 at 3:41 PM, Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; Hello,<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; I attach node only when I start the failover node (PostgreSQL) after<br>
&gt;&gt; &gt;&gt;&gt; &gt; primary is up and running. E.g. I start PostgreSQL on pgpool1, then I<br>
&gt;&gt; &gt;&gt;&gt; start<br>
&gt;&gt; &gt;&gt;&gt; &gt; popool-II and it detects the backend.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Probably at this point a fail over happens because PostgreSQL pgpool2<br>
&gt;&gt; &gt;&gt;&gt; is not running. So far so good.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; Then, when I start pgpool2, I need to<br>
&gt;&gt; &gt;&gt;&gt; &gt; manually attach it, so pgpool-II would know that the backend is<br>
&gt;&gt; online,<br>
&gt;&gt; &gt;&gt;&gt; &gt; right?<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Correct.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; Now nodes status. At this moment I see following nodes status:<br>
&gt;&gt; &gt;&gt;&gt; &gt; node_id  hostname   port   status   lb_weight  role       select_cnt<br>
&gt;&gt; &gt;&gt;&gt; &gt; 0        pgpool1    5432      2     0.500000   primary    66133198<br>
&gt;&gt; &gt;&gt;&gt; &gt; 1        pgpool2    5432      2     0.500000   standby    0<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; I don&#39;t know which node you executed &quot;show pool_nodes&quot; but as long as<br>
&gt;&gt; &gt;&gt;&gt; the result of the command are same, it is ok.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; So you sometimes see write queries are sent to PostgreSQL on pgpool2?<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; I have a sneaky feeling that lb_weight has something to do about<br>
&gt;&gt; what is<br>
&gt;&gt; &gt;&gt;&gt; &gt; going on. However, if you take a look at the pgpool.conf attached to<br>
&gt;&gt; the<br>
&gt;&gt; &gt;&gt;&gt; &gt; initial message, you&#39;ll find the backends configured like this:<br>
&gt;&gt; &gt;&gt;&gt; &gt; backend_hostname0 = &#39;pgpool1&#39;<br>
&gt;&gt; &gt;&gt;&gt; &gt; backend_port0 = 5432<br>
&gt;&gt; &gt;&gt;&gt; &gt; backend_weight0 = 1<br>
&gt;&gt; &gt;&gt;&gt; &gt; backend_data_directory0 = &#39;/var/lib/pgsql/9.4/data&#39;<br>
&gt;&gt; &gt;&gt;&gt; &gt; backend_flag0 = &#39;ALLOW_TO_FAILOVER&#39;<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; backend_hostname1 = &#39;pgpool2&#39;<br>
&gt;&gt; &gt;&gt;&gt; &gt; backend_port1 = 5432<br>
&gt;&gt; &gt;&gt;&gt; &gt; backend_weight1 = 1<br>
&gt;&gt; &gt;&gt;&gt; &gt; backend_data_directory1 = &#39;/var/lib/pgsql/9.4/data&#39;<br>
&gt;&gt; &gt;&gt;&gt; &gt; backend_flag1 = &#39;ALLOW_TO_FAILOVER&#39;<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; In particular, backend_weight is set to 1 on both nodes.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Don&#39;t worry. The load balance weight is always &quot;normalized&quot; so that<br>
&gt;&gt; &gt;&gt;&gt; the tatal weight is 1.0.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; Also, as far as I<br>
&gt;&gt; &gt;&gt;&gt; &gt; understand, this setting should not matter when<br>
&gt;&gt; load_balance_mode=off.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Correct.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; Regards,<br>
&gt;&gt; &gt;&gt;&gt; &gt; Vlad<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; On Sat, Aug 20, 2016 at 4:37 PM, Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt;<br>
&gt;&gt; &gt;&gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; Hi Lucas,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; I checked the log and found no failover entries. Here&#39;s how that<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; happens. I<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; start two postgres backends (master-slave streaming replication)<br>
&gt;&gt; and<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; pgpool-II instance. Then I attach both of the nodes and initially<br>
&gt;&gt; &gt;&gt;&gt; all the<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; clients get connected to master only.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; Why do you need attach the backends? Pgpool-II automatically attach<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; all backends valid in pgpool.conf.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; I see that with ps ax | grep<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; postgres. After some time new clients start getting connected to<br>
&gt;&gt; the<br>
&gt;&gt; &gt;&gt;&gt; hot<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; standby node while older clients are still connected to master.<br>
&gt;&gt; &gt;&gt;&gt; Again, I<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; see that with ps ax | grep postgres. In that case both master and<br>
&gt;&gt; hot<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; standby have pgpool-II connected. That&#39;s what concerns me the<br>
&gt;&gt; most.<br>
&gt;&gt; &gt;&gt;&gt; If<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; there was a failover event, master would&#39;ve been detached and<br>
&gt;&gt; there<br>
&gt;&gt; &gt;&gt;&gt; would<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; be no pgpool-II connections there.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; Can you connect to pgool using psql then issue &quot;show pool_nodes&quot;<br>
&gt;&gt; when<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; pgpool starts to behaves like this? This should show which is the<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; primary node (role) and which node should be the node the query<br>
&gt;&gt; routes<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; to (load_balance_node).<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; Best regards,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; Tatsuo Ishii<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; Vlad<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; On Sat, Aug 20, 2016 at 1:25 AM, Lucas Luengas &lt;<br>
&gt;&gt; &gt;&gt;&gt; <a href="mailto:lucasluengas@gmail.com">lucasluengas@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; Hello.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; Have you checked pgpool log file?  Maybe a failover happened?<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; On Fri, Aug 19, 2016 at 10:48 PM, Vlad Novikov &lt;<br>
&gt;&gt; &gt;&gt;&gt; <a href="mailto:xou.slackware@gmail.com">xou.slackware@gmail.com</a><br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; Hello,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; I&#39;m have setup pgpool-II with 2 backends in streaming mode (see<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; configuration file attached). In particular, I have<br>
&gt;&gt; &gt;&gt;&gt; load_balance_mode<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; = off<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; to make sure that in this pool all connections will be<br>
&gt;&gt; established<br>
&gt;&gt; &gt;&gt;&gt; to<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; streaming master only. However, over some time I see pgpool-II<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; establishing<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; connections to hot standby server. As a result client<br>
&gt;&gt; applications<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; start<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; failing as they cannot write to the database they&#39;re connected<br>
&gt;&gt; to.<br>
&gt;&gt; &gt;&gt;&gt; So<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; far<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; the only solution for me is to keep the hot standby detached<br>
&gt;&gt; &gt;&gt;&gt; (which is<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; not<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; a good idea in terms of automated failover).<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; Pgpool-II starts behaving like this at about 100 clients<br>
&gt;&gt; connected.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; PostgreSQL max_connections is set to 900 and with hot standby<br>
&gt;&gt; &gt;&gt;&gt; detached<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; there are no connection issues reported (all clients can connect<br>
&gt;&gt; &gt;&gt;&gt; to the<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; backend with no issues).<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; I use pgpool-II and PostgreSQL provided by PostgreSQL official<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; repository.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; PostgreSQL 9.4.9<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; pgpool-II 3.5.3<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; OS: CentOS 7.2<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; Is there anything I need to change in the configuration file to<br>
&gt;&gt; &gt;&gt;&gt; make<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; all<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; clients connect to master only when both backends are attached?<br>
&gt;&gt; &gt;&gt;&gt; From<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; what I<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; understand that is expected with load_balance_mode = off.<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; Regards,<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; Vlad<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; pgpool-general mailing list<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; <a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/<wbr>listinfo/pgpool-general</a><br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt;<br>
</div></div></blockquote></div><br></div>