mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
"standby switchover": check demotion candidate can make replication connection
Check it's actually possible for the demotion candidate to attach to the promotion candidate before executing the switchover. As with other checks of this nature, there's a faint possibility the situation could change between the time the check is carried out and the demotion candidate is restarted to connect to the promotion candidate, but there's not a lot we can do about that. The main purpose is to be able to catch existing misconfigurations before anything gets changed. Implements GitHub #370.
This commit is contained in:
@@ -68,6 +68,7 @@ typedef struct
|
||||
int node_id;
|
||||
char node_name[MAXLEN];
|
||||
char data_dir[MAXPGPATH];
|
||||
int remote_node_id;
|
||||
|
||||
/* "standby clone" options */
|
||||
bool copy_external_config_files;
|
||||
@@ -103,6 +104,7 @@ typedef struct
|
||||
bool role;
|
||||
bool slots;
|
||||
bool has_passfile;
|
||||
bool replication_connection;
|
||||
|
||||
/* "node join" options */
|
||||
char config_files[MAXLEN];
|
||||
@@ -139,8 +141,8 @@ typedef struct
|
||||
"", "", "", "", \
|
||||
/* other connection options */ \
|
||||
"", "", \
|
||||
/* node options */ \
|
||||
UNKNOWN_NODE_ID, "", "", \
|
||||
/* general node options */ \
|
||||
UNKNOWN_NODE_ID, "", "", UNKNOWN_NODE_ID, \
|
||||
/* "standby clone" options */ \
|
||||
false, CONFIG_FILE_SAMEPATH, false, false, false, "", "", "", \
|
||||
false, \
|
||||
@@ -153,7 +155,7 @@ typedef struct
|
||||
/* "node status" options */ \
|
||||
false, \
|
||||
/* "node check" options */ \
|
||||
false, false, false, false, false, false, \
|
||||
false, false, false, false, false, false, false, \
|
||||
/* "node join" options */ \
|
||||
"", \
|
||||
/* "node service" options */ \
|
||||
|
||||
Reference in New Issue
Block a user