From f2e65e1d2c5ed83780f4da3448fcd57be28b3ad6 Mon Sep 17 00:00:00 2001 From: Kosntantin Knizhnik Date: Sat, 19 Jul 2025 14:21:30 +0300 Subject: [PATCH] Remove assert checks from communicator_reconfigure_timeout_if_needed --- pgxn/neon/communicator.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pgxn/neon/communicator.c b/pgxn/neon/communicator.c index f4cfbb9fed..e5b79e6f91 100644 --- a/pgxn/neon/communicator.c +++ b/pgxn/neon/communicator.c @@ -2540,15 +2540,11 @@ communicator_reconfigure_timeout_if_needed(void) if (needs_set != timeout_set) { - /* The background writer doens't (shouldn't) read any pages */ - Assert(!AmBackgroundWriterProcess()); - /* The checkpointer doens't (shouldn't) read any pages */ - Assert(!AmCheckpointerProcess()); - if (unlikely(PS_TIMEOUT_ID == 0)) { PS_TIMEOUT_ID = RegisterTimeout(USER_TIMEOUT, pagestore_timeout_handler); - Assert(PS_TIMEOUT_ID >= 0); + if (PS_TIMEOUT_ID == -1) + ereport(PANIC, (errmsg("PS_TIMEOUT_ID == %d", PS_TIMEOUT_ID), errbacktrace())); } if (needs_set)