v2-0002-Add-assertion-for-WaitEventSetWait-in-crit-sectio.patch

application/octet-stream

Filename: v2-0002-Add-assertion-for-WaitEventSetWait-in-crit-sectio.patch
Type: application/octet-stream
Part: 1
Message: Re: VM corruption on standby

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch v2-0002
Subject: Add assertion for WaitEventSetWait in crit section
File+
src/backend/storage/ipc/waiteventset.c 1 0
From 566dfd994283822926a5a3231c92ee512d541a3c Mon Sep 17 00:00:00 2001
From: reshke <reshke@double.cloud>
Date: Tue, 19 Aug 2025 06:21:11 +0000
Subject: [PATCH v2 2/2] Add assertion for WaitEventSetWait in crit section

---
 src/backend/storage/ipc/waiteventset.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/backend/storage/ipc/waiteventset.c b/src/backend/storage/ipc/waiteventset.c
index 7c0e66900f9..e89e1d115cb 100644
--- a/src/backend/storage/ipc/waiteventset.c
+++ b/src/backend/storage/ipc/waiteventset.c
@@ -1044,6 +1044,7 @@ WaitEventSetWait(WaitEventSet *set, long timeout,
 	long		cur_timeout = -1;
 
 	Assert(nevents > 0);
+	Assert(CritSectionCount == 0);
 
 	/*
 	 * Initialize timeout if requested.  We must record the current time so
-- 
2.43.0