From e212a0f8e6ba95b403aa0ceacc05793449f5e742 Mon Sep 17 00:00:00 2001 From: Masahiko Sawada Date: Mon, 5 Jan 2026 15:49:43 -0800 Subject: [PATCH] pg_visibility: Fix incorrect buffer lock description in comment. Although the comment in collect_corrupt_items() stated that the buffer is locked in exclusive mode, it is actually locked in shared mode. Author: Chao Li Discussion: https://postgr.es/m/CAEoWx2kkhxgfp=kinPMetnwHaa0JjR6YBkO_0gg0oiy6mu7Zjw@mail.gmail.com --- contrib/pg_visibility/pg_visibility.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/pg_visibility/pg_visibility.c b/contrib/pg_visibility/pg_visibility.c index c019202f150..9bc3a784bf7 100644 --- a/contrib/pg_visibility/pg_visibility.c +++ b/contrib/pg_visibility/pg_visibility.c @@ -818,7 +818,7 @@ 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 + * locked in shared mode, but it should be safe against * deadlocks, because surely * GetStrictOldestNonRemovableTransactionId() should never * take a buffer lock. And this shouldn't happen often, so