<div dir="ltr"><br>On Wed, Mar 20, 2019 at 7:09 PM Alexander Dorogensky &lt;<a href="mailto:amazinglifetime@gmail.com">amazinglifetime@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt; Thanks for a very detailed explanation!<br>&gt;<br>&gt; How long can it take pgpool to detect that the trusted server (one) is not responsive?<br><br><br>Pgpool-II issues the ping command &quot;ping -c3 trusted_server&quot; for each server listed in trusted_servers list after every wd_interval seconds, and whenever<br>ping result for every server in the trusted_servers list comes out negative, Pgpool node consider itself as isolated and removes itself from cluster.<br>So effectively it takes maximum wd_interval number of seconds plus 3 ping attempts to detect the trusted_server is not responsive.<br><br>&gt;<br>&gt; We&#39;re using pgpool 3.6.9 and we have 2 node (primary/standby postgres cluster with streaming replication) configuration and each node has pgpool.<br>&gt;<br>&gt; We had to set trusted_servers because otherwise pgpool wouldn&#39;t detect network partition events such as when<br>&gt; network interface goes down on one of the nodes. So I believe in this configuration we wouldn&#39;t have been able to use<br>&gt; the pgpool&#39;s split-brain syndrome auto detection?<br>&gt;<br><br>Pgpool-II should still works very well in case of 2 node cluster ( although recommended is min 3). And in this case even if the split brain<br>happens it takes just few seconds for watchdog to detect and recover from it. So you can still disable  trusted_servers in your setup.<br><br>Also to protect against network interface going down you can use the interface monitoring in watchdog wd_monitoring_interfaces_list<br>(see <i><b>wd_monitoring_interfaces_list</b></i> in section 5.14.7 of <a href="http://www.pgpool.net/docs/latest/en/html/runtime-watchdog-config.html#CONFIG-WATCHDOG-SERVER-CONFIGURATION">http://www.pgpool.net/docs/latest/en/html/runtime-watchdog-config.html#CONFIG-WATCHDOG-SERVER-CONFIGURATION</a>)<div><br> <div>Thanks</div><div>Best Regards</div><div>Muhammad Usama</div><div><br><br>&gt;<br>&gt; Thank you Muhammad!<div>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; On Wed, Mar 20, 2019 at 8:23 AM Muhammad Usama &lt;<a href="mailto:m.usama@gmail.com">m.usama@gmail.com</a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt; Hi<br>&gt;&gt;<br>&gt;&gt; On Wed, Mar 13, 2019 at 6:28 PM Alexander Dorogensky &lt;<a href="mailto:amazinglifetime@gmail.com">amazinglifetime@gmail.com</a>&gt; wrote:<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Hi everyone,<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; We generally set this parameter to one host to remedy split brain situations but some customers have unreliable networks and therefore ping to that host would fail and pgpool would shut down.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; My understanding was that trusted server(s) connection will only be tested after degenerated state was detected (before triggering failover), is it correct?<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; If not.. how do I configure trusted servers in a flaky network?<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; No thats not correct, If the trusted_server(s) are configured than Pgpool-II try to ping the trusted_servers after every life-check interval (wd_interval),<br>&gt;&gt;<br>&gt;&gt; Basically the trusted_servers checking was introduced in the pgpool watchdog, during the early days of watchdog, and as you mentioned its purpose was to<br>&gt;&gt; mitigate the split-brain syndrome, by making sure that the Pgpool-II node which gets isolated from the network because of network partitioning or<br>&gt;&gt; some other network issue removes itself from the Pgpool-II cluster.<br>&gt;&gt;<br>&gt;&gt; But since Pgpool-II 3.5 there have been lots of enhancements made to the Pgpool-II watchdog specifically in the area of guarding against the split-brain and<br>&gt;&gt; other similar scenarios, and the latest versions of Pgpool-II does not require trusted_servers configuration to detect and avoid split-brain.<br>&gt;&gt;<br>&gt;&gt; So if you are using the Pgpool-II &gt; V 3.5 and the Pgpool-II cluster is configured with odd number of nodes (&gt;=3) than you can safely disable the trusted_server<br>&gt;&gt; configuration, and watchdog will take care of split-brain issue itself.<br>&gt;&gt;<br>&gt;&gt; Thanks<br>&gt;&gt; Best Regards<br>&gt;&gt; Muhammad Usama<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Thanks<br>&gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt; pgpool-general mailing list<br>&gt;&gt;&gt; <a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>&gt;&gt;&gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-general">http://www.pgpool.net/mailman/listinfo/pgpool-general</a></div></div></div></div>