<div dir="ltr"><div><div><div><div>Hi Bo!<br><br></div>I am still confused about what to trigger 'recovery' script:<br><br></div>Is it triggered on pgpool to detect that there is a postgresql server on a previously  failed host running on the default port?<br></div>Or it will not wait until such a server resumes running, but initiate recovery_1st again and again until finally it succeeds?<br></div>These are totally different.<br><br><br><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 15, 2023 at 7:45 AM Bo Peng <<a href="mailto:pengbo@sraoss.co.jp">pengbo@sraoss.co.jp</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">Hi,<br>
<br>
> Suppose I have configured ` health_check_user` , health_check_password,<br>
> health_check_database & health_check_max_retries<br>
> <br>
> Suppose now no postgres server is up. Will starting a pgpool automatically<br>
> detect the flaw and execute the failover script, even if it yields no<br>
> result?<br>
<br>
Yes. Failover will be performed and pgpool will not accept any requests.<br>
Before starting pgpool, we need to make sure one primary is available.<br>
<br>
> About `recovery` same thing again. Will the postgres server starts itself<br>
> before  pgpool recognize it as a `recovery node`? In this case, should<br>
> pgpool stop this new server before starting the replication?<br>
> <br>
> In general, how do you define the trigger event for each?<br>
<br>
Pgpool-II's "online recovery" is used to recovery a failed (DOWN) standby node.<br>
Pgpool-II's "online recovery" performs the recovery scripts which will automatically<br>
configure streaming replication.<br>
<br>
The following documents may help you configure pgpool.<br>
<br>
<a href="https://www.pgpool.net/docs/latest/en/html/example-cluster.html" rel="noreferrer" target="_blank">https://www.pgpool.net/docs/latest/en/html/example-cluster.html</a><br>
<a href="https://www.pgpool.net/docs/latest/en/html/example-replication-mode.html" rel="noreferrer" target="_blank">https://www.pgpool.net/docs/latest/en/html/example-replication-mode.html</a><br>
-- <br>
Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>><br>
SRA OSS LLC<br>
TEL: 03-5979-2701 FAX: 03-5979-2702<br>
URL: <a href="https://www.sraoss.co.jp/" rel="noreferrer" target="_blank">https://www.sraoss.co.jp/</a><br>
</blockquote></div>