<html><head></head><body><div class="ydp22b90bdyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div><div>Hi,&nbsp;</div><div><br></div><div>I am not sure I understand you use case, normally when master goes down then pgpool will detach the node and perform a failover. In the failover script you will usually promote the standby node.</div><div><br></div><div>When a detached node comes back, pgpool will not re-attach it automatically, it is not a bug but rather a feature I believe.</div><div><br></div><div class="ydp22b90bdsignature">Pierre</div></div>
        <div><br></div><div><br></div>
        
        </div><div id="ydpb8aba199yahoo_quoted_5156691561" class="ydpb8aba199yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Thursday, April 4, 2019, 2:45:54 PM GMT+2, Nitish Kumar &lt;itcell.mpwz@mp.gov.in&gt; wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="ydpb8aba199yiv7838019683">Hi Team,<div><br></div><div>I am using Pgpoo II 3.7 with 3 PostgreSQL 10.6 nodes at the backend.</div><div><br></div><div>Everything is working fine. But today we have noticed something unusual.</div><div><br></div><div>During a normal production run with heavy traffic our Primary Node went down due to network failure i.e the network between pgpool-11(master) server</div><div>and primary node went off !&nbsp;</div><div>So the pgpool output the following lines in log :</div><div><br></div><div>2019-04-04 16:12:56: pid 27680:LOG:&nbsp; failed to connect to PostgreSQL server on "172.18.0.160:5432", getsockopt() detected error "No route to host"</div><div><br></div><div>Our write requests started failing ! When we got alerted we debugged and found that Master DB or primary node was up and working fine. Only the network between</div><div>primary node &amp; pgpool II master server was down.&nbsp;</div><div><br></div><div>We fixed it ! and Pgpool II master process was able to connect to Primary Node. But it did not returned the primary node automatically to Pgpool cluster.</div><div>We got following lines in the logs continuously :</div><div><br></div><div><div>Apr&nbsp; 4 16:13:12 pgpool2 pgpool[21822]: [2325-1] 2019-04-04 16:13:12: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 0</div><div>Apr&nbsp; 4 16:13:12 pgpool2 pgpool[21822]: [2326-1] 2019-04-04 16:13:12: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 1</div><div>Apr&nbsp; 4 16:13:12 pgpool2 pgpool[21822]: [2327-1] 2019-04-04 16:13:12: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 2</div><div>Apr&nbsp; 4 16:13:13 pgpool2 pgpool[21822]: [2328-1] 2019-04-04 16:13:13: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 0</div><div>Apr&nbsp; 4 16:13:13 pgpool2 pgpool[21822]: [2329-1] 2019-04-04 16:13:13: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 1</div><div>Apr&nbsp; 4 16:13:13 pgpool2 pgpool[21822]: [2330-1] 2019-04-04 16:13:13: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 2</div><div>Apr&nbsp; 4 16:13:14 pgpool2 pgpool[21822]: [2331-1] 2019-04-04 16:13:14: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 0</div><div>Apr&nbsp; 4 16:13:14 pgpool2 pgpool[21822]: [2332-1] 2019-04-04 16:13:14: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 1</div><div>Apr&nbsp; 4 16:13:14 pgpool2 pgpool[21822]: [2333-1] 2019-04-04 16:13:14: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 2</div><div>Apr&nbsp; 4 16:13:15 pgpool2 pgpool[21822]: [2334-1] 2019-04-04 16:13:15: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 0</div><div>Apr&nbsp; 4 16:13:15 pgpool2 pgpool[21822]: [2335-1] 2019-04-04 16:13:15: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 1</div><div>Apr&nbsp; 4 16:13:15 pgpool2 pgpool[21822]: [2336-1] 2019-04-04 16:13:15: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 2</div><div>Apr&nbsp; 4 16:13:16 pgpool2 pgpool[21822]: [2337-1] 2019-04-04 16:13:16: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 0</div><div>Apr&nbsp; 4 16:13:16 pgpool2 pgpool[21822]: [2338-1] 2019-04-04 16:13:16: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 1</div><div>Apr&nbsp; 4 16:13:16 pgpool2 pgpool[21822]: [2339-1] 2019-04-04 16:13:16: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 2</div><div>Apr&nbsp; 4 16:13:17 pgpool2 pgpool[27247]: [2976-1] 2019-04-04 16:13:17: pid 27247:LOG:&nbsp; Replication of node:2 is behind 695032 bytes from the primary server (node:0)</div><div>Apr&nbsp; 4 16:13:17 pgpool2 pgpool[27247]: [2976-2] 2019-04-04 16:13:17: pid 27247:CONTEXT:&nbsp; while checking replication time lag</div><div>Apr&nbsp; 4 16:13:17 pgpool2 pgpool[21822]: [2340-1] 2019-04-04 16:13:17: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 0</div><div>Apr&nbsp; 4 16:13:17 pgpool2 pgpool[21822]: [2341-1] 2019-04-04 16:13:17: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 1</div><div>Apr&nbsp; 4 16:13:17 pgpool2 pgpool[21822]: [2342-1] 2019-04-04 16:13:17: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 2</div><div>Apr&nbsp; 4 16:13:19 pgpool2 pgpool[21822]: [2343-1] 2019-04-04 16:13:19: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 0</div><div>Apr&nbsp; 4 16:13:19 pgpool2 pgpool[21822]: [2344-1] 2019-04-04 16:13:19: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 1</div><div>Apr&nbsp; 4 16:13:19 pgpool2 pgpool[21822]: [2345-1] 2019-04-04 16:13:19: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 2</div><div>Apr&nbsp; 4 16:13:20 pgpool2 pgpool[21822]: [2346-1] 2019-04-04 16:13:20: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 0</div><div>Apr&nbsp; 4 16:13:20 pgpool2 pgpool[21822]: [2347-1] 2019-04-04 16:13:20: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 1</div><div>Apr&nbsp; 4 16:13:20 pgpool2 pgpool[21822]: [2348-1] 2019-04-04 16:13:20: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 2</div><div>Apr&nbsp; 4 16:13:21 pgpool2 pgpool[21822]: [2349-1] 2019-04-04 16:13:21: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 0</div><div>Apr&nbsp; 4 16:13:21 pgpool2 pgpool[21822]: [2350-1] 2019-04-04 16:13:21: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 1</div><div>Apr&nbsp; 4 16:13:21 pgpool2 pgpool[21822]: [2351-1] 2019-04-04 16:13:21: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 2</div><div>Apr&nbsp; 4 16:13:22 pgpool2 pgpool[21822]: [2352-1] 2019-04-04 16:13:22: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 0</div><div>Apr&nbsp; 4 16:13:22 pgpool2 pgpool[21822]: [2353-1] 2019-04-04 16:13:22: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 1</div><div>Apr&nbsp; 4 16:13:22 pgpool2 pgpool[21822]: [2354-1] 2019-04-04 16:13:22: pid 21822:LOG:&nbsp; find_primary_node: checking backend no 2</div></div><div><br></div><div><b>To get the primary node back into pgpool II cluster we have to manually click return in PgPoolAdmin web-app.&nbsp;</b></div><div><b><br></b></div><div><b>My concern is why primary node did not returned to the cluster automatically after the network resolved ???</b></div><div><b><br></b></div><div><b>Kindly help guys so that I can avert this kind of failovers in future. Is there something I am missing here ??</b></div><div><b><br></b></div><div>Regards,</div><div>Nitish Kumar</div><div><br></div></div>_______________________________________________<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/listinfo/pgpool-general</a><br></div>
            </div>
        </div></body></html>