diff --git a/pgxn/neon/communicator.c b/pgxn/neon/communicator.c index 2855860d60..f4cfbb9fed 100644 --- a/pgxn/neon/communicator.c +++ b/pgxn/neon/communicator.c @@ -2533,8 +2533,7 @@ void communicator_reconfigure_timeout_if_needed(void) { bool needs_set = (MyPState->ring_receive != MyPState->ring_unused || - (RecoveryInProgress() && - MIN_BACKEND_PREFETCH_LSN != InvalidXLogRecPtr && + (MIN_BACKEND_PREFETCH_LSN != InvalidXLogRecPtr && MIN_BACKEND_PREFETCH_LSN != GetXLogReplayRecPtr(NULL))) && !AmPrewarmWorker && /* do not pump prefetch state in prewarm worker */ readahead_getpage_pull_timeout_ms > 0; @@ -2549,6 +2548,7 @@ communicator_reconfigure_timeout_if_needed(void) if (unlikely(PS_TIMEOUT_ID == 0)) { PS_TIMEOUT_ID = RegisterTimeout(USER_TIMEOUT, pagestore_timeout_handler); + Assert(PS_TIMEOUT_ID >= 0); } if (needs_set)