mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
"standby switchover": add "--repmgrd-force-unpause"
Implements GitHub #559.
This commit is contained in:
@@ -478,6 +478,10 @@ main(int argc, char **argv)
|
||||
runtime_options.repmgrd_no_pause = true;
|
||||
break;
|
||||
|
||||
case OPT_REPMGRD_FORCE_UNPAUSE:
|
||||
runtime_options.repmgrd_force_unpause = true;
|
||||
break;
|
||||
|
||||
/*----------------------
|
||||
* "node status" options
|
||||
*----------------------
|
||||
@@ -1858,6 +1862,22 @@ check_cli_parameters(const int action)
|
||||
}
|
||||
}
|
||||
|
||||
if (runtime_options.repmgrd_force_unpause == true)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case STANDBY_SWITCHOVER:
|
||||
if (runtime_options.repmgrd_no_pause == true)
|
||||
item_list_append(&cli_errors,
|
||||
_("--repmgrd-force-unpause and --repmgrd-no-pause cannot be used together"));
|
||||
break;
|
||||
default:
|
||||
item_list_append_format(&cli_warnings,
|
||||
_("--repmgrd-force-unpause will be ignored when executing %s"),
|
||||
action_name(action));
|
||||
}
|
||||
}
|
||||
|
||||
if (runtime_options.config_files[0] != '\0')
|
||||
{
|
||||
switch (action)
|
||||
|
||||
Reference in New Issue
Block a user