repmgrd: fix configuration file reloading

Don't allow "promote_command" or "follow_command" to be empty.

GitHub #486.
This commit is contained in:
Ian Barwick
2018-08-02 15:08:26 +09:00
parent 33dedf4e96
commit 44a224ad92
5 changed files with 32 additions and 17 deletions

View File

@@ -293,7 +293,7 @@ loop:
/*
* if we can reload, then could need to change local_conn
*/
if (reload_config(&config_file_options))
if (reload_config(&config_file_options, BDR))
{
PQfinish(local_conn);
local_conn = establish_db_connection(config_file_options.conninfo, true);
@@ -303,11 +303,12 @@ loop:
got_SIGHUP = false;
}
/* XXX this looks like it will never be called */
if (got_SIGHUP)
{
log_debug("SIGHUP received");
if (reload_config(&config_file_options))
if (reload_config(&config_file_options, BDR))
{
PQfinish(local_conn);
local_conn = establish_db_connection(config_file_options.conninfo, true);