mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Emit warning if -w/--wal-keep-segments used when use_replication_slots set
This commit is contained in:
14
repmgr.c
14
repmgr.c
@@ -363,6 +363,7 @@ main(int argc, char **argv)
|
||||
exit(ERR_BAD_CONFIG);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If no configuration file was provided, set to a default file
|
||||
* which `parse_config()` will attempt to read if it exists
|
||||
@@ -440,6 +441,19 @@ main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* If `use_replication_slots` set in the configuration file
|
||||
* and command line parameter `--wal-keep-segments` was used,
|
||||
* emit a warning as to the latter's redundancy. Note that
|
||||
* the version check for 9.4 or later will occur afterwards.
|
||||
*/
|
||||
|
||||
if(options.use_replication_slots && strlen(runtime_options.wal_keep_segments))
|
||||
{
|
||||
log_warning(_("-w/--wal-keep-segments has no effect when replication slots in use\n"));
|
||||
}
|
||||
|
||||
/* Initialise the repmgr schema name */
|
||||
maxlen_snprintf(repmgr_schema, "%s%s", DEFAULT_REPMGR_SCHEMA_PREFIX,
|
||||
options.cluster_name);
|
||||
|
||||
Reference in New Issue
Block a user