repmgrd: don't wait for WAL receiver to reconnect during failover

If the WAL receiver has been temporarily disabled, we don't want to
wait for it to start up as it may not be able to at that point; we do
however need to reset "wal_retrieve_retry_interval".
This commit is contained in:
Ian Barwick
2019-03-05 11:20:33 +09:00
parent ae8171e461
commit 9823978f41
4 changed files with 17 additions and 5 deletions

View File

@@ -2707,9 +2707,18 @@ do_node_control(void)
if (runtime_options.enable_wal_receiver == true)
{
wal_receiver_pid = enable_wal_receiver(conn);
wal_receiver_pid = enable_wal_receiver(conn, true);
PQfinish(conn);
if (wal_receiver_pid == UNKNOWN_PID)
exit(ERR_BAD_CONFIG);
exit(SUCCESS);
}
log_error(_("no option provided"));
PQfinish(conn);
}