<div dir="ltr"><span style="background-color:transparent;color:rgb(0,0,0);font-family:Consolas;font-size:13.33px;font-variant-numeric:normal;font-variant-east-asian:normal;white-space:pre-wrap">1. failover_command : this will usually be a shell script. The script will
do a standby promote on new master, so there is no reason that it would
fail and I believe it is over-engineering to do more than that. But since
this is a script, you are free to put what you want in it : if you want to
check the result of the standby promote and if it fails try on the third
node, it is possible.


&gt;</span><i style="background-color:transparent;color:rgb(0,0,0);font-family:Consolas;font-size:13.33px;font-variant-numeric:normal;font-variant-east-asian:normal;white-space:pre-wrap"> Yep understood thanks. But i was looking for more of an automatic retry.
</i><span style="background-color:transparent;color:rgb(0,0,0);font-family:Consolas;font-size:13.33px;font-variant-numeric:normal;font-variant-east-asian:normal;white-space:pre-wrap">So if pgpool cannot promote a new postgres master for some resaon and
failover failed, i was expecting it to promote other nodes that are
avialable in the quorum



2. pgpool does not support switch-over, you would have to stop the primary
postgres database and let pgpool trigger the failover and then run a
pcp_recovery on the old primary postgres



&gt;</span><i style="background-color:transparent;color:rgb(0,0,0);font-family:Consolas;font-size:13.33px;font-variant-numeric:normal;font-variant-east-asian:normal;white-space:pre-wrap"> Ok. So the reason behind the ask was if pgpool is not going to retry the
</i><span style="background-color:transparent;color:rgb(0,0,0);font-family:Consolas;font-size:13.33px;font-variant-numeric:normal;font-variant-east-asian:normal;white-space:pre-wrap">promote on other nodes, I was thinking i can just trigger a force promote
there by failover and follow master will be run by pgpool itself and i dont
have to do a failover by myself and run pcp_recovery on all the nodes



Regarding 5. It&#39;s normal. Don&#39;t worry.

When a standby PostgreSQL node is added, existing connections to
Pgpool-II are kept (thus do not use the new standby for load
balacing). After the session ends, Pgpool-II child process checks
whether the failback has happend. If happend, exits itself so that new
process is spwan to reflect the fact that new standby node has been
added (thus it can use the new standby for load balancing).




&gt;</span><i style="background-color:transparent;color:rgb(0,0,0);font-family:Consolas;font-size:13.33px;font-variant-numeric:normal;font-variant-east-asian:normal;white-space:pre-wrap"> Thanks. Per my understanding, So restart happens only when a new standby
</i><span style="background-color:transparent;color:rgb(0,0,0);font-family:Consolas;font-size:13.33px;font-variant-numeric:normal;font-variant-east-asian:normal;white-space:pre-wrap">is added is it. Because i see this frequent restarts happening even when
there is no fallback.

Also could you please share some light on when the failback_command gets
executed? I have never seen the command being called.


Thanks And Regards,

   Lakshmi Y M</span><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 23, 2019 at 10:03 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; Answers to some questions (just my ideas )<br>
&gt; 1. failover_command : this will usually be a shell script. The script will do a standby promote on new master, so there is no reason that it would fail and I believe it is over-engineering to do more than that. But since this is a script, you are free to put what you want in it : if you want to check the result of the standby promote and if it fails try on the third node, it is possible.<br>
&gt; 2. pgpool does not support switch-over, you would have to stop the primary postgres database and let pgpool trigger the failover and then run a pcp_recovery on the old primary postgres<br>
&gt; 3. The VIP point to the pgpool master not to the postgres master. So application connects to pgpool, not to postgres.<br>
&gt; 4. No, pgpool will not do anything when a failed standby comes back, this must be done manually or you could develop a script and schedule it via cron for example (it is a bit complex and it might be risky)<br>
&gt; 5. No idea, sorry<br>
&gt; Pierre <br>
<br>
Regarding 5. It&#39;s normal. Don&#39;t worry.<br>
<br>
When a standby PostgreSQL node is added, existing connections to<br>
Pgpool-II are kept (thus do not use the new standby for load<br>
balacing). After the session ends, Pgpool-II child process checks<br>
whether the failback has happend. If happend, exits itself so that new<br>
process is spwan to reflect the fact that new standby node has been<br>
added (thus it can use the new standby for load balancing).<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>
</blockquote></div>