<div dir="ltr"><div>Hello.</div><div><br></div><div>You can try to enable more log information. In pgpool, you can enable log_statement and log_per_node_statement. In postgresql, en both nodes, you can enable log_statement. </div><div>With this information, you can see if connections to standby node are from pgpool health checks or from your application.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 20, 2016 at 6:22 PM, Vlad Novikov <span dir="ltr">&lt;<a href="mailto:xou.slackware@gmail.com" target="_blank">xou.slackware@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Lucas,</div><div><br></div>I checked the log and found no failover entries. Here&#39;s how that happens. I start two postgres backends (master-slave streaming replication) and pgpool-II instance. Then I attach both of the nodes and initially all the clients get connected to master only. I see that with ps ax | grep postgres. After some time new clients start getting connected to the hot standby node while older clients are still connected to master. Again, I see that with ps ax | grep postgres. In that case both master and hot standby have pgpool-II connected. That&#39;s what concerns me the most. If there was a failover event, master would&#39;ve been detached and there would be no pgpool-II connections there.<div><br></div><div>Vlad</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 20, 2016 at 1:25 AM, Lucas Luengas <span dir="ltr">&lt;<a href="mailto:lucasluengas@gmail.com" target="_blank">lucasluengas@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello.<div><br></div><div>Have you checked pgpool log file?  Maybe a failover happened?</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Fri, Aug 19, 2016 at 10:48 PM, Vlad Novikov <span dir="ltr">&lt;<a href="mailto:xou.slackware@gmail.com" target="_blank">xou.slackware@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><span style="font-size:12.8px">Hello,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I&#39;m have setup pgpool-II with 2 backends in streaming mode (see configuration file attached). In particular, I have load_balance_mode = off to make sure that in this pool all connections will be established to streaming master only. However, over some time I see pgpool-II establishing connections to hot standby server. As a result client applications start failing as they cannot write to the database they&#39;re connected to. So far the only solution for me is to keep the hot standby detached (which is not a good idea in terms of automated failover).</div><div style="font-size:12.8px">Pgpool-II starts behaving like this at about 100 clients connected. PostgreSQL max_connections is set to 900 and with hot standby detached there are no connection issues reported (all clients can connect to the backend with no issues).</div><div style="font-size:12.8px">I use pgpool-II and PostgreSQL provided by PostgreSQL official repository.</div><div style="font-size:12.8px">PostgreSQL 9.4.9</div><div style="font-size:12.8px">pgpool-II 3.5.3</div><div style="font-size:12.8px">OS: CentOS 7.2</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Is there anything I need to change in the configuration file to make all clients connect to master only when both backends are attached? From what I understand that is expected with load_balance_mode = off.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Regards,</div><div style="font-size:12.8px">Vlad</div></div>
<br></div></div>______________________________<wbr>_________________<br>
pgpool-general mailing list<br>
<a href="mailto:pgpool-general@pgpool.net" target="_blank">pgpool-general@pgpool.net</a><br>
<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>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</blockquote></div><br></div>