From 25fb24eee4728d8016e6238e91478d87b2a517dc Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Wed, 30 Oct 2019 16:58:30 +0900 Subject: [PATCH] Minor cleanup in repmgr-client.c --- repmgr-client.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/repmgr-client.c b/repmgr-client.c index fad11c6d..1a292097 100644 --- a/repmgr-client.c +++ b/repmgr-client.c @@ -293,8 +293,7 @@ main(int argc, char **argv) * These are the standard database connection options; with * the exception of -d/--dbname (which could be a conninfo * string) we'll also set these values in "source_conninfo" - * (overwriting preset values from environment variables). XXX - * check this is same as psql + * (overwriting preset values from environment variables). */ /* -d/--dbname */ case 'd': @@ -1435,9 +1434,6 @@ main(int argc, char **argv) * * Messages will be added to the command line warning and error lists * as appropriate. - * - * XXX for each individual actions, check only required actions - * for non-required actions check warn if provided */ static void @@ -1493,10 +1489,15 @@ check_cli_parameters(const int action) } /* - * XXX if -D/--pgdata provided, and also - * config_file_options.pgdata, warn -D/--pgdata will be - * ignored + * If -D/--pgdata was provided, but config_file_options.pgdata + * is set, warn that -D/--pgdata will be ignored. */ + if (runtime_options.data_dir[0] && config_file_options.data_directory[0]) + { + item_list_append(&cli_warnings, + _("-D/--pgdata will be ignored if a repmgr configuration file is provided")); + + } if (*runtime_options.upstream_conninfo) {