<div dir="ltr"><div class="gmail_default" style="font-family: courier\ new, monospace;">With &#39;trusted_servers&#39; configured, when I unplug 10.0.0.1 it kills pgpool, i.e. &#39;service pgpool status&#39; reports &#39;pgpool dead but subsys locked&#39;.<br></div><div class="gmail_default" style="font-family: courier\ new, monospace;">Is that how it should be?<br><br></div><div style="font-family: courier\ new, monospace;" class="gmail_default">​Plug/unplug = ifconfig eth0 up/down​</div><br><div class="gmail_default" style="font-family: courier\ new, monospace;"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 27, 2018 at 1:49 PM, Pierre Timmermans <span dir="ltr">&lt;<a href="mailto:ptim007@yahoo.com" target="_blank">ptim007@yahoo.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><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px"><div><div>To prevent this split brain scenario (caused by a network partition) you can use the configuration trusted_servers. This setting is a list of servers that pgpool can use to determine if a node is suffering a network partition or not. If a node cannot reach any of the servers in the list, then it will assume it is isolated (by a network partition) and will not promote itself to master.</div><div><br></div><div>In general, when you have only two nodes, it is not safe to do an automatic failover I believe.  Unless you have some kind of fencing mechanism (means: you can shutdown and prevent a failed node to come back after a failure).</div><div><br></div><div class="m_3379743114426128903ydp2a8d5a3csignature">Pierre</div></div>
            <div><br></div><div><br></div>
            
            <div id="m_3379743114426128903ydp44fa9843yahoo_quoted_0647994684" class="m_3379743114426128903ydp44fa9843yahoo_quoted">
                <div style="font-family:&#39;Helvetica Neue&#39;,Helvetica,Arial,sans-serif;font-size:13px;color:#26282a"><div><div class="h5">
                    
                    <div>
                        On Tuesday, February 27, 2018, 7:58:55 PM GMT+1, Alexander Dorogensky &lt;<a href="mailto:amazinglifetime@gmail.com" target="_blank">amazinglifetime@gmail.com</a>&gt; wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
                    </div></div><div><div><div class="h5"><div id="m_3379743114426128903ydp44fa9843yiv4431463748"><div dir="ltr"><div class="m_3379743114426128903ydp44fa9843yiv4431463748gmail_default" style="font-family:new,monospace">Hi All,<br><br></div><div class="m_3379743114426128903ydp44fa9843yiv4431463748gmail_default" style="font-family:new,monospace">I have a <a href="http://10.0.0.1/10.0.0.2" rel="nofollow" target="_blank">10.0.0.1/10.0.0.2</a> master/hot standby configuration with streaming replication, where each node runs pgpool with watchdog enabled and postgres.<br><br></div><div class="m_3379743114426128903ydp44fa9843yiv4431463748gmail_default" style="font-family:new,monospace">I shut down the network interface on 10.0.0.1 and wait until 10.0.0.2 triggers failover and promotes itself to master through my failover script.<br><br></div><div class="m_3379743114426128903ydp44fa9843yiv4431463748gmail_default" style="font-family:new,monospace">Now the watchdogs on 10.0.0.1 and 10.0.0.2 are out of sync, have conflicting views on which node has failed and both think they are master.<br><br></div><div class="m_3379743114426128903ydp44fa9843yiv4431463748gmail_default" style="font-family:new,monospace">When I bring back the network interface on 10.0.0.1, &#39;show pool_nodes&#39; says that 10.0.0.1 is master/up and 10.0.0.2 is standby/down. <br><br></div><div class="m_3379743114426128903ydp44fa9843yiv4431463748gmail_default" style="font-family:new,monospace">I want 10.0.0.1 to be standby and 10.0.0.2 to be master. <br></div><div class="m_3379743114426128903ydp44fa9843yiv4431463748gmail_default" style="font-family:new,monospace"><br></div><div class="m_3379743114426128903ydp44fa9843yiv4431463748gmail_default" style="font-family:new,monospace">I&#39;ve been playing with the failover script.. e.g.<br><br>if (default network gateway is pingable) {<br></div><div class="m_3379743114426128903ydp44fa9843yiv4431463748gmail_default" style="font-family:new,monospace">    shut down pgpool and postgres<br></div><div class="m_3379743114426128903ydp44fa9843yiv4431463748gmail_default" style="font-family:new,monospace">} else if (this node is standby) {<br></div><div class="m_3379743114426128903ydp44fa9843yiv4431463748gmail_default" style="font-family:new,monospace">    promote this node to master<br></div><div class="m_3379743114426128903ydp44fa9843yiv4431463748gmail_default" style="font-family:new,monospace">    create a job that will run every minute and try to recover failed node (base backup) <br>    cancel the job upon successful recovery<br>} <br><br></div><div class="m_3379743114426128903ydp44fa9843yiv4431463748gmail_default" style="font-family:new,monospace">Can you please help me with this? Any ideas would be highly appreciated.<br><br></div><div class="m_3379743114426128903ydp44fa9843yiv4431463748gmail_default" style="font-family:new,monospace">Regards, Alex<br></div></div></div></div></div>______________________________<wbr>_________________<br>pgpool-general mailing list<br><a href="mailto:pgpool-general@pgpool.net" rel="nofollow" target="_blank">pgpool-general@pgpool.net</a><br><a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="nofollow" target="_blank">http://www.pgpool.net/mailman/<wbr>listinfo/pgpool-general</a><br></div>
                </div>
            </div></div></div></blockquote></div><br></div>