From 083e288ac3ce49a48b8a673466ec26b7d7f058d5 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 8 Dec 2016 23:01:46 +0900 Subject: [PATCH] repmgr: add usage warnings for --no-conninfo-password --- repmgr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/repmgr.c b/repmgr.c index 27c365be..0edf3b3b 100644 --- a/repmgr.c +++ b/repmgr.c @@ -6982,6 +6982,11 @@ check_parameters_for_action(const int action) item_list_append(&cli_warnings, _("--no-upstream-connection only effective in Barman mode")); } + if (*runtime_options.upstream_conninfo && runtime_options.no_conninfo_password == true) + { + item_list_append(&cli_warnings, _("--no-conninfo-password ineffective when specifying --upstream-conninfo")); + } + config_file_required = false; break; @@ -7075,6 +7080,11 @@ check_parameters_for_action(const int action) { item_list_append(&cli_warnings, _("--upstream-conninfo can only be used when executing STANDBY CLONE")); } + + if (runtime_options.no_conninfo_password == true) + { + item_list_append(&cli_warnings, _("--no-conninfo-password can only be used when executing STANDBY CLONE")); + } } /* Warn about parameters which apply to STANDBY REGISTER only */