<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">Hello Tatsuo<br />
<br />
Thanks for the explanation.<br />
<br />
I am using Pgpool-II 4.2.2.<br />
<br />
I am still trying to investigate into the issue more and trying to reproduce it by changing different things.<br />
<br />
It’s strange cz it only occurs sporadically.<br />
<br />
I will keep you updated if I find more info.</div>
</div>
<div name="messageSignatureSection"><br />
Thank you,
<div dir="auto"><br /></div>
<div dir="auto">Anirudh</div>
</div>
<div name="messageReplySection">On 23 Sep 2021, 2:36 PM +0200, 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;">Hi,<br />
<br />
<blockquote type="cite">Hello<br />
<br />
I have a setup with 3 postgres nodes running behind one pgpool docker container.<br />
<br />
The setup works fine when the primary node fails/is shutdown. Failover goes fine in that case.<br />
<br />
However, if the standby goes down, the health check fails but instead of performing a failover, pgpool throws this error message-<br />
<br />
2021-09-23 08:37:54: pid 94: LOG: invalid degenerate backend request, node id : 2 status: [2] is not valid for failover<br />
<br />
What¢s a bit strange to me is that this only happens when I am running the pgpool container through Nomad.<br />
<br />
If I run it directly without Nomad, it still works as expected. Even though this is the only difference that I see between the working and non-working setup, I believe this isn¢t the root cause.<br />
<br />
If you can point me towards when a degenerate request is considered invalid, it might help.<br /></blockquote>
<br />
The message says that PostgreSQL backend node id 2 is up and<br />
running. Strange thing is, that's the normal prerequisite to trigger<br />
failover because if the node is already down, there's no point to<br />
trigger failover. Actually before this (raising an error) happens,<br />
Pgpool-II checks a copy of backend status on the process's private<br />
memory, and it seems the status from the private memory is different<br />
from the status (which is in the shared memory) referred to in the<br />
error message. This is hard to understand because the status in the<br />
private memory and the one in the shared memory should be same since<br />
it has been copied when the health check process started.<br />
<br />
The only explanations I can think of are:<br />
<br />
- for some reason Nomad screwed up the private memory of pgpool<br />
(actually the process is health check process).<br />
<br />
- Pgpool-II has new bug and it was revealed accidentally.<br />
<br />
BTW, what version of Pgpool-II are you using? I need more checking on<br />
the source code.<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>
</div>
</body>
</html>