[pgpool-hackers: 4390] Proposal: promoting standby which is most up to date to become the new Primary
Bo Peng
pengbo at sraoss.co.jp
Tue Aug 29 15:47:49 JST 2023
Hi,
Currently, pgpool promotes the standby node with minimal node id to become the new primary.
If there is replication lag between primary and the standby node,
it may cause data loss after failover.
I propose to promote the standby, which is most up to date, to become the new Primary.
This feature is able to prevent data loss.
I am not sure which senario is better. Do you have any ideas?
1. Change get_next_main_node() to return the standby which is most up to date
2. Add a new PCP command to return the standby which is most up to date.
Modify the failover sample script to run the PCP command and set the result to NEW_MAIN_NODE_ID.
--
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS LLC
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/
More information about the pgpool-hackers
mailing list