mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Add "repmgr standby follow --upstream-node-id"
In an automatic failover situation, after a standby has been promoted there's a risk the original primary may become available again before "standby follow" is issued on another standby node, in which case "standby follow" will reconnect to the original primary. As the standby's repmgrd will have received a notification from the new primary, it will know the primary's ID and can therefore explicitly direct "standby follow" to follow that primary.
This commit is contained in:
@@ -65,9 +65,11 @@ typedef struct
|
||||
char recovery_min_apply_delay[MAXLEN];
|
||||
char replication_user[MAXLEN];
|
||||
char upstream_conninfo[MAXLEN];
|
||||
int upstream_node_id;
|
||||
bool without_barman;
|
||||
|
||||
/* "standby clone"/"standby follow" options */
|
||||
int upstream_node_id;
|
||||
|
||||
/* "standby register" options */
|
||||
bool wait_register_sync;
|
||||
int wait_register_sync_seconds;
|
||||
@@ -123,7 +125,9 @@ typedef struct
|
||||
UNKNOWN_NODE_ID, "", "", \
|
||||
/* "standby clone" options */ \
|
||||
false, CONFIG_FILE_SAMEPATH, false, false, false, "", "", "", \
|
||||
NO_UPSTREAM_NODE, false, \
|
||||
false, \
|
||||
/* "standby clone"/"standby follow" options */ \
|
||||
NO_UPSTREAM_NODE, \
|
||||
/* "standby register" options */ \
|
||||
false, 0, \
|
||||
/* "standby switchover" options */ \
|
||||
|
||||
Reference in New Issue
Block a user