mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
Create checkpoint after pg_ctl promote (#378)
Creates a Postgres checkpoint after `pg_ctl promote` runs on the former standby and before `pg_rewind` runs on the former master. This fixes the race condition that was reported in https://github.com/2ndQuadrant/repmgr/issues/372
This commit is contained in:
committed by
Ian Barwick
parent
5411225b6f
commit
dd9df04334
6
repmgr.c
6
repmgr.c
@@ -4515,6 +4515,12 @@ do_standby_promote(void)
|
||||
|
||||
log_notice(_("STANDBY PROMOTE successful\n"));
|
||||
|
||||
/*
|
||||
* Force a checkpoint so that pg_rewind on former master can tell that the
|
||||
* servers have diverged.
|
||||
*/
|
||||
create_checkpoint(conn);
|
||||
|
||||
/* Log the event */
|
||||
create_event_record(conn,
|
||||
&options,
|
||||
|
||||
Reference in New Issue
Block a user