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 <daniel@heroku.com>
This commit is contained in:
Daniel Farina
2011-02-10 03:17:10 -08:00
parent 4b007bf4bc
commit ce21291418

View File

@@ -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