repmgrd: fix configuration file reload handling

Usually repmgrd requires the parameters "promote_command" and
"follow_command" to be present in the configuration file. These are
not required if "failover=manual", but the configuration sanity check
following receipt of SIGHUP was not checking that.

Addresses issue reported in GitHub #614.
This commit is contained in:
Ian Barwick
2019-12-16 11:35:41 +09:00
parent 9d2d3296fb
commit f288e7c6b5

View File

@@ -1180,7 +1180,8 @@ reload_config(t_configuration_options *orig_options, t_server_type server_type)
_parse_config(&new_options, &config_errors, &config_warnings);
if (server_type == PRIMARY || server_type == STANDBY)
if (new_options.failover == FAILOVER_AUTOMATIC
&& (server_type == PRIMARY || server_type == STANDBY))
{
if (new_options.promote_command[0] == '\0')
{