mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user