<div dir="ltr">Hello,<div><br></div><div>I repeated the same procedure.</div><div><br></div><div>postgres@ip-172-31-39-241:/etc/pgpool2/4.0.9$ pcp_recovery_node -h localhost -p 9898 -n 0<br>Password: <br>ERROR:  process recovery request failed<br>DETAIL:  primary server cannot be recovered by online recovery.<br></div><div><br></div><div>Sequence:</div><div>1. pg1 is primary and pg2 is standby</div><div>2. Stop postgres service on pg1</div><div>3. Pgpool executes failover</div><div>4. Now pg2 is my primary</div><div>5. Started postgres service on pg1</div><div><br></div><div>Log says verify_backend_node_status: decided node 0 is the true primary</div><div><br></div><div>This command hangs</div><div>psql -U postgres -h localhost -p 9999 --pset pager=off -c &quot;show pool_nodes&quot;<br></div><div><br></div><div>I would like to know how pgpool is considering node 0 which is pg1 as true primary.</div><div><br></div><div>Then what did I do ?</div><div>1. Cleaned everything on pg1 and manually configured it as standby.</div><div>2. Started postgres service</div><div>3. Log says</div><div>2020-08-31 13:40:00: pid 2459: DEBUG:  do_query: extended:0 query:&quot;SELECT pg_is_in_recovery()&quot;<br>2020-08-31 13:40:00: pid 2459: DEBUG:  verify_backend_node_status: there&#39;s no standby node<br>2020-08-31 13:40:00: pid 2459: DEBUG:  node status[0]: 0<br>2020-08-31 13:40:00: pid 2459: DEBUG:  node status[1]: 1<br></div><div><br></div><div>This command executes now</div><div>postgres@ip-172-31-39-241:/etc/pgpool2/4.0.9$ psql -U postgres -h localhost -p 9999 --pset pager=off -c &quot;show pool_nodes&quot;<br> node_id | hostname | port | status | lb_weight |  role   | select_cnt | load_balance_node | replication_delay | last_status_change  <br>---------+----------+------+--------+-----------+---------+------------+-------------------+-------------------+---------------------<br> 0       | pg1      | 5432 | down   | 0.500000  | standby | 0          | false             | 0                 | 2020-08-31 13:35:44<br> 1       | pg2      | 5432 | up     | 0.500000  | primary | 0          | true              | 0                 | 2020-08-31 13:35:44<br>(2 rows)<br></div><div><br></div><div>I checked between pg1 and pg2 and see that streaming replication is working.</div><div><br></div><div>Now, how can I mark this standby node as up in pgpool without executing the pcp_recovery_node command ?</div><div><br></div><div>Thanks!</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 31, 2020 at 6:41 AM Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">&gt; I&#39;m not sure I am understanding.<br>
&gt; If a old primary node will resume it has to become a new standby if a<br>
&gt; primary was promoted with an automatic failover.<br>
&gt; <br>
&gt; Let me explain my use case.<br>
&gt; I&#39;m building a new repmgr cluster with one primary and two standbys.<br>
&gt;  During the night dumps of virtual machines are automatically triggered and<br>
&gt; it could happen that one virtual machine could be unavailable for a while<br>
&gt; during the dump. If this happens, Pgpool will make a failover and a standby<br>
&gt; node will become primary. After some minutes the former primary will become<br>
&gt; available again, but it would be a false primary. In this case I&#39;d issue a<br>
&gt; &quot;repmgr node rejoin&quot; command to let it become a new standby.<br>
&gt; <br>
&gt; I would like this to happen automatically.<br>
<br>
I am not fammilar with repmgr. What does &quot;repmgr node rejoin&quot;? Why do<br>
you need repmgr in the first place? Doe it have a feature which<br>
Pgpool-II does not have?<br>
<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_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
_______________________________________________<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/listinfo/pgpool-general</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><font style="font-family:&quot;courier new&quot;,monospace" size="1"><b style="color:rgb(102,102,102)">Regards,<br><br></b></font><div style="color:rgb(102,102,102)"><font size="1"><b><font face="&#39;comic sans ms&#39;, sans-serif"><font style="font-family:&quot;courier new&quot;,monospace" size="1">K S Praveen Kumar<br>M: +91-9986855625 </font><br></font></b></font></div></div>