"standby switchover": add "--repmgrd-force-unpause"

Implements GitHub #559.
This commit is contained in:
Ian Barwick
2019-05-10 16:00:24 +09:00
parent d43b40c5c6
commit d8e4c54ea4
7 changed files with 54 additions and 3 deletions

View File

@@ -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)