<div dir="ltr">In fact, reading <a href="https://www.pgpool.net/docs/latest/en/html/runtime-config-failover.html">https://www.pgpool.net/docs/latest/en/html/runtime-config-failover.html</a> says:<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>A <span class="gmail-PRODUCTNAME">PostgreSQL</span> node detached by failover or
  switch over will never return to the previous state (attached state)
  automatically <b>in the default setting</b>. Restarting
  <span class="gmail-PRODUCTNAME">Pgpool-II</span> with -D option or running <a href="https://www.pgpool.net/docs/latest/en/html/pcp-attach-node.html">pcp_attach_node</a> makes it to the attached state again. It
  is recommended to confirm the replication_state of <a href="https://www.pgpool.net/docs/latest/en/html/sql-show-pool-nodes.html">SHOW POOL NODES</a> is "streaming" before doing that. The
  state indicates that the standby server is properly connected to the
  primary server through streaming replication and both databases are
  in sync.</div><div><p>  From 4.1 a new parameter <a href="https://www.pgpool.net/docs/latest/en/html/runtime-config-failover.html#GUC-AUTO-FAILBACK">auto_failback</a> can be
  used to do above automatically. See <a href="https://www.pgpool.net/docs/latest/en/html/runtime-config-failover.html#GUC-AUTO-FAILBACK">auto_failback</a> for more details.  </p></div></blockquote><div><p>If I want to recover standby nodes automagically, what shoudl I do?</p></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 19, 2023 at 12:23 PM Tan Mientras <<a href="mailto:tanimientras@gmail.com">tanimientras@gmail.com</a>> 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"><div dir="ltr"><div dir="ltr">Hi.</div><div dir="ltr"><br></div><div dir="ltr">Thanks for your response and help. More questions follow.</div><div dir="ltr"><br></div><div dir="ltr">On Tue, Sep 19, 2023 at 3:57 AM Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
> What's the difference between status and pg_status? <br>
<br>
status: backend status managed by pgpool<br>
pg_status: actual backend status (taken from pg_isready. Pgpool-II 4.3 or later)<br></blockquote><div>Ok</div><div>Said so, having status:down with pg_status:up is not desirable, right? how to avoid that?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">After failover, pgpool detached the node1 and mark it's status as "down":<br><br>
After you restarted node0, you need to run "pcp_attach_node" to attach this node to pgpool.<br>
Primary node does not automatically fail back because it's a safe way to manage a cluster.<br>
<br>
<a href="https://www.pgpool.net/docs/latest/en/html/pcp-attach-node.html" rel="noreferrer" target="_blank">https://www.pgpool.net/docs/latest/en/html/pcp-attach-node.html</a><br></blockquote><div>This manual step is required only for primary nodes? What about non-primary nodes? how to automatically recovering them?</div><div><br></div><div><br></div></div></div>
</blockquote></div>