<div dir="rtl"><div dir="ltr">Hi Tatsuo.</div><div dir="ltr">It suddenly happened again during the weekend. This time I got errors in my log : </div><div dir="ltr"><div dir="ltr">-11 18:43:33 - [No Connection] [20902]LOG:  trying connecting to PostgreSQL server on &quot;ptkpl-psgsqldb2:5432&quot; by INET socket</div><div dir="ltr">[[No Connection]]([No Connection]) - 2018-05-11 18:43:33 - [No Connection] [20902]DETAIL:  timed out. retrying...</div><div dir="ltr"><div dir="ltr">11 18:44:03 - [No Connection] [18906]LOG:  failed to connect to PostgreSQL server on &quot;ptkpl-psgsqldb2:5432&quot;, getsockopt() detected error &quot;No route to host&quot;</div><div dir="ltr">[[No Connection]]([No Connection]) - 2018-05-11 18:44:03 - [No Connection] [18906]LOG:  received degenerate backend request for node_id: 1 from pid [18906]</div><div dir="ltr"><br></div><div>and the pool keeped looking for the primary &quot;find_primary_node: checking backend no 0/1/2&quot; for  6 minutes. During all this time the primary was up and was working fine. What do you recommend to do ? Only after attaching the primary again everything worked. Why the pool didnt recognizer the primary ? I&#39;m checking with my networking team If there was a network problem but I dont think that it is related.</div><div><br></div><div><br></div><div>Thanks , MARIEL.</div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2018-05-06 17:22 GMT+03:00 Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>&gt;</span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Both &quot;show pool_nodes&quot; and pcp_node_info after all checks the status<br>
on the shared memory area. However the implementation is completely<br>
different; &quot;show pool_nodes&quot; is simpler and it&#39;s just a wrapper for<br>
showing the status as SQL. pcp_node_info is a client/server<br>
program. The status is retrieved by pcp server then is sent to pcp<br>
client (pcp_node_info) via pcp protocol.<br>
<br>
Also next time you&#39;d better check the status file to very whether<br>
pcp_node_info tells the truth.<br>
<div class="HOEnZb"><div class="h5"><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>
&gt; No, I didnt check the status via &quot;show pool_nodes&quot;. To be honest it<br>
isnt<br>
&gt; the first time it happens. Does there a difference between show_pool_nodes<br>
&gt; and pcp_node info on the deeper level ? I mean I know that show_pool_nodes<br>
&gt; queries a view or a table, what about pcp_node_info ? I dont think that it<br>
&gt; is related to repmgr..<br>
&gt; <br>
&gt; 2018-05-06 16:49 GMT+03:00 Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt;:<br>
&gt; <br>
&gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt; I have 3 postgres servers (one primary + 2 standbys) that have<br>
&gt;&gt; replciation<br>
&gt;&gt; &gt; configured with repmgr:<br>
&gt;&gt; &gt; pg1 - standby<br>
&gt;&gt; &gt; pg2 - primary<br>
&gt;&gt; &gt; pg3 - standby<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I have also 2 pgpool servers(v 3.7.2 and on each one there is one pool<br>
&gt;&gt; &gt; instance. There isnt any watchdog, instead I have a vip address that<br>
&gt;&gt; &gt; directs the requests to the available pgpool instance. I configured my<br>
&gt;&gt; own<br>
&gt;&gt; &gt; metrics that check the status of the database nodes via the pcp<br>
&gt;&gt; interface.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Today at 11:25 suddenly I got an alert that both my pgpools saw that the<br>
&gt;&gt; &gt; primary node is down (via pcp). I connected and checked and indeed the<br>
&gt;&gt; &gt; primary was down :<br>
&gt;&gt; &gt; [postgres@pool2 log]$ pcp_node_info -h localhost -U postgres -p 9898 1<br>
&gt;&gt; -w<br>
&gt;&gt; &gt; pg2 5432 2 0.333333 down standby<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I checked it in both pools and the same result. I immediatly attached<br>
&gt;&gt; them<br>
&gt;&gt; &gt; and it worked. I wanted to understand why it happened but I dont see any<br>
&gt;&gt; &gt; error in the logs. I attach the logs of both my pools. Can you help me<br>
&gt;&gt; &gt; identify the problem ?<br>
&gt;&gt;<br>
&gt;&gt; No idea. I have never seen PostgreSQL is detached without any trace in<br>
&gt;&gt; pgpool log. Have you seen the node status using &quot;show pool_nodes&quot;? If<br>
&gt;&gt; not, I suspect there&#39;s a bug with pcp_node_info. If you tried &quot;show<br>
&gt;&gt; pool_nodes&quot; and saw the same status as pcp_node_info, then I<br>
&gt;&gt; completely lose idea.<br>
&gt;&gt;<br>
&gt;&gt; There may be a interaction with repmgr, but I am not familiar with<br>
&gt;&gt; repmgr and this is just a wild guess.<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>
</div></div></blockquote></div><br></div>