From b92d0cc696a42c657d48687b00caf0d3d8c065a7 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 31 Aug 2017 16:20:03 +0900 Subject: [PATCH] "standby switchover": don't use --ignore-external-config-files It's deprecated. Do however pass "--copy-external-config-files" if specified. Per GitHub #310. --- repmgr.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/repmgr.c b/repmgr.c index df9a090e..6ef05cd3 100644 --- a/repmgr.c +++ b/repmgr.c @@ -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")); }