Improve pg_bindir parameter handling

Previously, the pg_bindir parameter was mandatory and could only be
provided in the repmgr.conf file, which was leading to the slightly
bizarre situation that e.g. for "clone standby", repmgr was complaining
that it didn't want the configuration file when it actually did.

pg_bindir is now optional - if not provided, it will use the default
path. It can be provided in the repmgr.conf file, or as a command
line parameter; the latter overrides the former.
This commit is contained in:
Ian Barwick
2015-02-04 13:54:12 +09:00
parent 3d9d0d98af
commit a3f0e89a05
3 changed files with 62 additions and 24 deletions

View File

@@ -177,12 +177,6 @@ parse_config(const char *config_file, t_configuration_options * options)
log_err(_("Reconnect intervals must be zero or greater. Check the configuration file.\n"));
exit(ERR_BAD_CONFIG);
}
if (*options->pg_bindir == '\0')
{
log_err(_("pg_bindir config value not found. Check the configuration file.\n"));
exit(ERR_BAD_CONFIG);
}
}