Add missing Barman options check

This commit is contained in:
Ian Barwick
2017-08-21 14:10:08 +09:00
parent 4943909282
commit 7ca396b9cb

View File

@@ -913,7 +913,26 @@ main(int argc, char **argv)
argv[0]);
/* Some configuration file items can be overriden by command line options */
/* check for conflicts between runtime options and configuration file */
/* ================================================================== */
if (action == STANDBY_CLONE)
{
standy_clone_mode mode = get_standby_clone_mode();
if (mode == barman && runtime_options.without_barman == false
&& config_file_options.use_replication_slots == true)
{
log_error(_("STANDBY CLONE in Barman mode is incompatible with configuration option \"use_replication_slots\""));
log_hint(_("set \"use_replication_slots\" to \"no\" in repmgr.conf, or use --without-barman fo clone directly from the upstream server"));
exit(ERR_BAD_CONFIG);
}
}
/* Check for configuration file items which can be overriden by runtime options */
/* ============================================================================ */
/* Command-line parameter -L/--log-level overrides any setting in config file*/
if (*runtime_options.log_level != '\0')
{