mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
standby switchover: optionally delay promotion
This is for testing purposes only and should not be used in production.
This commit is contained in:
@@ -5230,6 +5230,18 @@ do_standby_switchover(void)
|
||||
format_lsn(replication_info.last_wal_receive_lsn),
|
||||
format_lsn(remote_last_checkpoint_lsn));
|
||||
|
||||
/*
|
||||
* optionally add a delay before promoting the standby; this is mainly
|
||||
* useful for testing (e.g. for reappearance of the original primary) and
|
||||
* is not documented.
|
||||
*/
|
||||
if (config_file_options.promote_delay > 0)
|
||||
{
|
||||
log_debug("sleeping %i seconds before promoting standby",
|
||||
config_file_options.promote_delay);
|
||||
sleep(config_file_options.promote_delay);
|
||||
}
|
||||
|
||||
/*
|
||||
* Promote standby (local node).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user