]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
pg_visibility: Fix incorrect buffer lock description in comment.
authorMasahiko Sawada <msawada@postgresql.org>
Mon, 5 Jan 2026 23:49:43 +0000 (15:49 -0800)
committerMasahiko Sawada <msawada@postgresql.org>
Mon, 5 Jan 2026 23:49:43 +0000 (15:49 -0800)
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 <lic@highgo.com>
Discussion: https://postgr.es/m/CAEoWx2kkhxgfp=kinPMetnwHaa0JjR6YBkO_0gg0oiy6mu7Zjw@mail.gmail.com

contrib/pg_visibility/pg_visibility.c

index c019202f15089f00d962906d680012f5a856b7ee..9bc3a784bf7c09033364c1a393f5a8a6180fc13e 100644 (file)
@@ -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