From f288e7c6b5a84907031dd807b2cc049fb0355060 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Mon, 16 Dec 2019 11:35:41 +0900 Subject: [PATCH] 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. --- configfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configfile.c b/configfile.c index 453bbaa9..44b8388e 100644 --- a/configfile.c +++ b/configfile.c @@ -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') {