From ce212914188fb07ef1b3efa64dd18ca36b1488b8 Mon Sep 17 00:00:00 2001 From: Daniel Farina Date: Thu, 10 Feb 2011 03:17:10 -0800 Subject: [PATCH] Issue a message when a configuration file is passed unnecessarily Simply intends to set expectations around the fact that a config file is not used *and* doesn't affect anything material about the standby clone command. This uses a notion of "logging level" (like NOTICE) that is not yet seen this program, but I'll probably introduce that soon. Signed-off-by: Daniel Farina --- repmgr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/repmgr.c b/repmgr.c index 127043ff..cfee11af 100644 --- a/repmgr.c +++ b/repmgr.c @@ -1558,6 +1558,16 @@ check_parameters_for_action(const int action) } break; case STANDBY_CLONE: + /* + * Issue a friendly notice that the configuration file is not + * necessary nor read at all in when performing a STANDBY CLONE + * action. + */ + if (config_file != NULL) + fprintf(stderr, "NOTICE: The passed configuration file is not " + "required nor used when performing the STANDBY CLONE " + "command.\n"); + /* * To clone a master into a standby we need connection parameters * repmgr.conf is useless because we don't have a server running in