<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">Dear Tatsuo<br />
<br />
I am using the built RPMs from <a href="https://www.pgpool.net/yum/rpms/4.2/" target="_blank">https://www.pgpool.net/yum/rpms/4.2/</a>. If my understanding is correct, these latest fixes won’t be available here as a RPM until a new version is released. So, I was just asking if you have a timeline for that.</div>
</div>
<div name="messageSignatureSection"><br />
Thank you
<div dir="auto"><br /></div>
<div dir="auto">Anirudh</div>
</div>
<div name="messageReplySection">On 10 Feb 2022, 3:02 AM +0100, Tatsuo Ishii <ishii@sraoss.co.jp>, wrote:<br />
<blockquote type="cite" style="border-left-color: grey; border-left-width: thin; border-left-style: solid; margin: 5px 5px;padding-left: 10px;">
<blockquote type="cite">Hello Tatsuo<br />
<br />
Thank you so much for such prompt fixes.<br />
<br />
Since I am actually running the packaged version (4.2.2) of pgpool in my setup, I would like to know if you already have a timeline for releasing these new updates in a new packaged version?<br /></blockquote>
<br />
You are using debian/Ubuntu package for Pgpool-II? Unfortunately I am<br />
not in charge of creating/releasing them and I cannot answer the<br />
question.<br />
<br />
<blockquote type="cite">That way I can wait for some time and upgrade to the latest packaged version instead of building from source.<br />
Thank you<br />
<br />
Anirudh<br />
On 6 Feb 2022, 12:33 PM +0100, Tatsuo Ishii <ishii@sraoss.co.jp>, wrote:<br />
<blockquote type="cite">I have found multiple issues with Pgpool-II in your scenario<br />
(i.e. primary PostgreSQL is not up when pgpool starts).<br />
<br />
1) I assume your failover.sh is based on the script coming with<br />
Pgpool-II. The script does not promote standby node if old primary<br />
node (%P) is -1. You need to fix the script.<br />
<br />
Change this line:<br />
<br />
if [ $FAILED_NODE_ID -ne $OLD_PRIMARY_NODE_ID ]; then<br />
<br />
to:<br />
<br />
if [ $OLD_PRIMARY_NODE_ID != "-1" -a $FAILED_NODE_ID -ne $OLD_PRIMARY_NODE_ID ]; then<br />
<br />
<br />
2) Even if #1 is fixed, Pgpool-II has a bug: after failover.sh gets<br />
executed (thus one of standby node has been promoted), the new primary<br />
node is not detected by Pgpool-II.<br />
<br />
3) After failover is done, follow primary command is executed (if<br />
set). Pgpool-II fails to execute the command in the scenario.<br />
<br />
I have already pushed the fix for #2 and #3 for all supported<br />
branches. For example the commit for 4.3 is here:<br />
<br />
https://git.postgresql.org/gitweb/?p=pgpool2.git;a=blobdiff;f=src/main/pgpool_main.c;h=13049e1f9b4520e709ab0cdcea6ed29a8a2faef2;hp=80a25d00f20f9ef0a893e89f1b824fa1fc3db225;hb=5028a50d718944a6a1d19f8fa984b4c30d8f7dae;hpb=8e5e49426aeb89cdf2bd5c18928261ad2311e5b4<br />
<br />
<blockquote type="cite">I have looked into pgpool.conf. You need to set other than 0 to<br />
search_primary_node_timeout. pgpool will not start up until<br />
search_primary_node_timeout is expired.<br />
<br />
<blockquote type="cite">I have attached both, logs and conf file.<br />
On 6 Feb 2022, 2:46 AM +0100, Tatsuo Ishii <ishii@sraoss.co.jp>, wrote:<br />
<blockquote type="cite">Have you enabled health check?<br />
Can you share pgpool.conf?<br />
<br />
<blockquote type="cite">But that’s the issue - pgpool didn’t perform a failover.<br />
<br />
It just said this and then gave up:<br />
2022-02-04 16:48:53: pid 9: LOG: ignoring the failover request, since we are still starting up<br />
On 6 Feb 2022, 2:32 AM +0100, Tatsuo Ishii <ishii@sraoss.co.jp>, wrote:<br />
<blockquote type="cite">But after starting up pgpool will detect that the primary went down by<br />
health check and perform failover anyway, no?<br />
<br />
<blockquote type="cite">Thank you Tatsuo for your reply but can’t pgpool setup the other resources regardless of the primary being up and then perform the failover?<br />
<br />
I need this behaviour because I cannot pgpool in cluster mode due to infrastructure limitations.<br />
<br />
Cheers<br />
<br />
Anirudh<br />
On 6 Feb 2022, 1:51 AM +0100, Tatsuo Ishii <ishii@sraoss.co.jp>, wrote:<br />
<blockquote type="cite">
<blockquote type="cite">Hello<br />
<br />
I have a setup with 1 pgpool and 2 postgresql primary-replica nodes.<br />
<br />
I am testing a certain scenario - what if the pgpool goes down, then the primary goes down and then the pgpool comes back up.<br />
<br />
I was expecting that pgpool would perform a failover after it comes back up but instead it says this:<br />
2022-02-04 16:48:53: pid 9: LOG: Pgpool-II parent process has received failover request<br />
2022-02-04 16:48:53: pid 9: LOG: ignoring the failover request, since we are still starting up<br />
<br />
So my question is, is there a parameter or some way that we can tell pgpool to perform a failover if the primary is down while pgpool is starting up?<br />
<br />
I tried looking at the code but according to https://github.com/pgpool/pgpool2/blob/master/src/main/pgpool_main.c#L1329, I don¢t see a parameter other than processState.<br />
<br />
Is there a logical reason why pgpool cannot/won't perform a failover during startup?<br /></blockquote>
<br />
Because pgpool needs to setup various resouses including shared memory<br />
and others for managing failover.<br />
<br />
Best reagards,<br />
--<br />
Tatsuo Ishii<br />
SRA OSS, Inc. Japan<br />
English: http://www.sraoss.co.jp/index_en.php<br />
Japanese:http://www.sraoss.co.jp<br /></blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
_______________________________________________<br />
pgpool-hackers mailing list<br />
pgpool-hackers@pgpool.net<br />
http://www.pgpool.net/mailman/listinfo/pgpool-hackers<br /></blockquote>
</blockquote>
</blockquote>
</blockquote>
</div>
</body>
</html>