From c37ae53e1447920fd2cbecb056f9dc00905b3d2f Mon Sep 17 00:00:00 2001
From: "Chao Li (Evan)" <lic@highgo.com>
Date: Wed, 24 Dec 2025 10:07:22 +0800
Subject: [PATCH v1] Fix incorrect buffer lock description in pg_visibility
 comment

Correct a comment in pg_visibility.c that described a buffer as being
exclusively locked when it is in fact held with a shared lock.

No functional change intended.

Author: Chao Li <lic@highgo.com>
---
 contrib/pg_visibility/pg_visibility.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/pg_visibility/pg_visibility.c b/contrib/pg_visibility/pg_visibility.c
index 715f5cdd17c..b2749128559 100644
--- a/contrib/pg_visibility/pg_visibility.c
+++ b/contrib/pg_visibility/pg_visibility.c
@@ -818,11 +818,11 @@ collect_corrupt_items(Oid relid, bool all_visible, bool all_frozen)
 				 *
 				 * From a concurrency point of view, it sort of sucks to
 				 * retake ProcArrayLock here while we're holding the buffer
-				 * exclusively locked, but it should be safe against
-				 * deadlocks, because surely
-				 * GetStrictOldestNonRemovableTransactionId() should never
-				 * take a buffer lock. And this shouldn't happen often, so
-				 * it's worth being careful so as to avoid false positives.
+				 * shared locked, but it should be safe against deadlocks,
+				 * because surely GetStrictOldestNonRemovableTransactionId()
+				 * should never take a buffer lock. And this shouldn't happen
+				 * often, so it's worth being careful so as to avoid false
+				 * positives.
 				 */
 				RecomputedOldestXmin = GetStrictOldestNonRemovableTransactionId(rel);
 
-- 
2.39.5 (Apple Git-154)

