Add missing call to ConditionVariableCancelSleep().
authorRobert Haas <[email protected]>
Wed, 17 Jul 2024 18:53:00 +0000 (14:53 -0400)
committerRobert Haas <[email protected]>
Mon, 22 Jul 2024 14:02:31 +0000 (10:02 -0400)
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

src/backend/postmaster/walsummarizer.c

index 83c178e766273bdd6ad43e9a30f782082bac3c03..191b360bef4b91cc0513398e25f6cc084c0d4e57 100644 (file)
@@ -682,6 +682,8 @@ WaitForWalSummarization(XLogRecPtr lsn, long timeout, XLogRecPtr *pending_lsn)
                                    WAIT_EVENT_WAL_SUMMARY_READY);
    }
 
+   ConditionVariableCancelSleep();
+
    return summarized_lsn;
 }