"standby switchover": don't use --ignore-external-config-files

It's deprecated. Do however pass "--copy-external-config-files" if
specified.

Per GitHub #310.
This commit is contained in:
Ian Barwick
2017-08-31 16:20:03 +09:00
parent 2264848601
commit b92d0cc696

View File

@@ -5536,9 +5536,15 @@ do_standby_switchover(void)
appendPQExpBuffer(&remote_command_str, " -f ");
appendShellString(&remote_command_str, runtime_options.remote_config_file);
appendPQExpBuffer(&remote_command_str,
" %s --rsync-only --force --ignore-external-config-files standby clone",
" %s --rsync-only --force standby clone",
repmgr_db_cli_params);
if (runtime_options.copy_external_config_files == true)
{
appendPQExpBuffer(&remote_command_str,
" --copy-external-config-files");
}
log_debug("Executing:\n%s\n", remote_command_str.data);
initPQExpBuffer(&command_output);
@@ -7369,7 +7375,8 @@ check_parameters_for_action(const int action)
item_list_append(&cli_warnings, _("-c/--fast-checkpoint can only be used when executing STANDBY CLONE"));
}
if (runtime_options.copy_external_config_files)
/* can be used for "standby switchover" too */
if (action != STANDBY_SWITCHOVER && runtime_options.copy_external_config_files)
{
item_list_append(&cli_warnings, _("--copy-external-config-files can only be used when executing STANDBY CLONE"));
}