diff --git a/repmgr-client.c b/repmgr-client.c index 08b6b9b8..16adb65c 100644 --- a/repmgr-client.c +++ b/repmgr-client.c @@ -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') {