[pgpool-general: 7468] Re: Expected behaviour after pcp_detach_node ?

Tatsuo Ishii ishii at sraoss.co.jp
Mon Mar 29 19:44:48 JST 2021


> Further question:
> 
> If I detach a primary, is it supposed to be automatically up again as
> a standby? Because that's what happens now even if I have
> "auto_failback=off".
> 
> So the follow_master.sh is execute in all other nodes but the new
> primary? Even if the node is manually detached?

Pgpool-II executes the follow master command for all nodes.
And in your script:

## If Standby is running, synchronize it with the new Primary.

so the script is happy to turn the previous primary node into standby,
yes, even if the node is manually detached.

You might think that the script could check the node status and
PostgreSQL and if the node status is down (because of
pcp_detach_node), we can skip the process.

Unfortunately this will not work because Pgpool-II turns the node
status into down *before* executing the follow master command. in
another word, you can not know if the node is manually detached or not
in the follow master command. The design was made by someone long time
ago. I do not think the design is terribly good and probably we should
provide a way to check whether the node was manually brought down.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-general mailing list