From 51343732c36cff15c3bd038aa4ee0401275a1794 Mon Sep 17 00:00:00 2001 From: Rahila Syed Date: Wed, 17 Dec 2025 12:10:12 +0530 Subject: [PATCH 2/2] Add comment --- src/backend/storage/ipc/ipc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c index eb3185f1f59..e4198bd83ef 100644 --- a/src/backend/storage/ipc/ipc.c +++ b/src/backend/storage/ipc/ipc.c @@ -232,7 +232,9 @@ shmem_exit(int code) /* * Release any LWLocks we might be holding, before running callbacks that - * may detach the memory containing those locks. + * may detach the memory containing those locks. Releasing all the locks + * ensures that any callbacks executed afterward will be able to acquire + * any lock. */ LWLockReleaseAll(); -- 2.34.1