From df49def453d193de9c8d9fc102a3b9f8f304217c Mon Sep 17 00:00:00 2001 From: Kosntantin Knizhnik Date: Sat, 19 Jul 2025 09:25:13 +0300 Subject: [PATCH] Add assert check thsat timeout is registered --- pgxn/neon/communicator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)