Skip to content

Commit

Permalink
Fix timeout value used in XLogWaitForReplayOf
Browse files Browse the repository at this point in the history
The previous value assumed usec precision, while the timeout used is in
milliseconds, causing replica backends to wait for many hours for WAL
replay without the expected progress reports in logs.

This fixes the issue.
  • Loading branch information
MMeent committed Nov 29, 2024
1 parent f5cfc6f commit 13e9e35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/access/transam/xlogrecovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ XLogWaitForReplayOf(XLogRecPtr redoEndRecPtr)
{
bool timeout;
timeout = ConditionVariableTimedSleep(&XLogRecoveryCtl->replayProgressCV,
10000000, /* 10 seconds */
10000, /* 10 seconds, in millis */
WAIT_EVENT_RECOVERY_WAL_STREAM);

replayRecPtr = GetXLogReplayRecPtr(NULL);
Expand Down

0 comments on commit 13e9e35

Please sign in to comment.