mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 00:26:30 +00:00
Rework config file handling
If no configuration file provided, also check default Postgres sysconfig dir. It would also be useful to check the configuration directory provided by the RPM/DEB packages, not sure if that's programmatically feasible.
This commit is contained in:
5
repmgr.c
5
repmgr.c
@@ -419,7 +419,6 @@ main(int argc, char **argv)
|
||||
|
||||
if (runtime_options.verbose && runtime_options.config_file[0])
|
||||
{
|
||||
|
||||
log_notice(_("opening configuration file: %s\n"),
|
||||
runtime_options.config_file);
|
||||
}
|
||||
@@ -429,7 +428,7 @@ main(int argc, char **argv)
|
||||
* however if available we'll parse it anyway for options like 'log_level',
|
||||
* 'use_replication_slots' etc.
|
||||
*/
|
||||
config_file_parsed = parse_config(runtime_options.config_file, &options);
|
||||
config_file_parsed = load_config(runtime_options.config_file, &options, argv[0]);
|
||||
|
||||
/*
|
||||
* Initialise pg_bindir - command line parameter will override
|
||||
@@ -3355,7 +3354,7 @@ do_check_upstream_config(void)
|
||||
bool config_ok;
|
||||
int server_version_num;
|
||||
|
||||
parse_config(runtime_options.config_file, &options);
|
||||
parse_config(&options);
|
||||
|
||||
/* Connection parameters for upstream server only */
|
||||
keywords[0] = "host";
|
||||
|
||||
Reference in New Issue
Block a user