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
committed by Ian Barwick
parent ae675059c0
commit 280654bed6
4 changed files with 17 additions and 5 deletions

View File

@@ -276,7 +276,7 @@ disable_wal_receiver(PGconn *conn)
}
pid_t
enable_wal_receiver(PGconn *conn)
enable_wal_receiver(PGconn *conn, bool wait_startup)
{
char buf[MAXLEN];
int wal_retrieve_retry_interval;
@@ -326,6 +326,9 @@ enable_wal_receiver(PGconn *conn)
wal_retrieve_retry_interval);
}
if (wait_startup == false)
return UNKNOWN_PID;
for (i = 0; i < timeout; i++)
{
wal_receiver_pid = (pid_t)get_wal_receiver_pid(conn);