mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
repmgrd: add parameter "failover_delay"
This parameter is not documented and intended for use during testing. It should not be used in production.
This commit is contained in:
@@ -189,6 +189,7 @@ typedef struct
|
|||||||
|
|
||||||
/* undocumented test settings */
|
/* undocumented test settings */
|
||||||
int promote_delay;
|
int promote_delay;
|
||||||
|
int failover_delay;
|
||||||
} t_configuration_options;
|
} t_configuration_options;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -243,8 +244,9 @@ typedef struct
|
|||||||
/* barman settings */ \
|
/* barman settings */ \
|
||||||
"", "", "", \
|
"", "", "", \
|
||||||
/* rsync/ssh settings */ \
|
/* rsync/ssh settings */ \
|
||||||
"", "", \
|
"", "", \
|
||||||
/* undocumented test settings */ \
|
/* undocumented test settings */ \
|
||||||
|
0, \
|
||||||
0 \
|
0 \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4100,6 +4100,12 @@ do_election(NodeInfoList *sibling_nodes, int *new_primary_id)
|
|||||||
|
|
||||||
return ELECTION_NOT_CANDIDATE;
|
return ELECTION_NOT_CANDIDATE;
|
||||||
}
|
}
|
||||||
|
if (config_file_options.failover_delay > 0)
|
||||||
|
{
|
||||||
|
log_debug("sleeping %i seconds (\"failover_delay\") before initiating failover",
|
||||||
|
config_file_options.failover_delay);
|
||||||
|
sleep(config_file_options.failover_delay);
|
||||||
|
}
|
||||||
|
|
||||||
/* node priority is set to zero - don't become a candidate, and lose by default */
|
/* node priority is set to zero - don't become a candidate, and lose by default */
|
||||||
if (local_node_info.priority <= 0)
|
if (local_node_info.priority <= 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user