From: Robert Haas Date: Wed, 17 Jul 2024 18:53:00 +0000 (-0400) Subject: Add missing call to ConditionVariableCancelSleep(). X-Git-Tag: REL_17_BETA3~57 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=6c8d2ea7a5fb7f85e5f64994affa33e79c19ddd3;p=postgresql.git Add missing call to ConditionVariableCancelSleep(). After calling ConditionVariableSleep() or ConditionVariableTimedSleep() one or more times, code is supposed to call ConditionVariableCancelSleep() to remove itself from the waitlist. This code neglected to do so. As far as I know, that had no observable consequences, but let's make the code correct. Discussion: http://postgr.es/m/CA+TgmoYW8eR+KN6zhVH0sin7QH6AvENqw_bkN-bB4yLYKAnsew@mail.gmail.com --- diff --git a/src/backend/postmaster/walsummarizer.c b/src/backend/postmaster/walsummarizer.c index 83c178e7662..191b360bef4 100644 --- a/src/backend/postmaster/walsummarizer.c +++ b/src/backend/postmaster/walsummarizer.c @@ -682,6 +682,8 @@ WaitForWalSummarization(XLogRecPtr lsn, long timeout, XLogRecPtr *pending_lsn) WAIT_EVENT_WAL_SUMMARY_READY); } + ConditionVariableCancelSleep(); + return summarized_lsn; }