Skip to content

Commit 44e44bd

Browse files
Correct _bt_delitems_vacuum() lock comments.
The expectation within _bt_delitems_vacuum() is that caller has a super-exclusive/cleanup buffer lock (not just a pin and a write lock).
1 parent 1fa846f commit 44e44bd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/backend/access/nbtree/nbtpage.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -967,8 +967,9 @@ _bt_page_recyclable(Page page)
967967
* non-leaf page has to be done as part of an atomic action that includes
968968
* deleting the page it points to.
969969
*
970-
* This routine assumes that the caller has pinned and locked the buffer.
971-
* Also, the given deletable array *must* be sorted in ascending order.
970+
* This routine assumes that the caller has a super-exclusive write lock on
971+
* the buffer. Also, the given deletable array *must* be sorted in ascending
972+
* order.
972973
*
973974
* We record VACUUMs and b-tree deletes differently in WAL. Deletes must
974975
* generate recovery conflicts by accessing the heap inline, whereas VACUUMs
@@ -1049,8 +1050,9 @@ _bt_delitems_vacuum(Relation rel, Buffer buf,
10491050
*
10501051
* As above, must only be used on leaf pages.
10511052
*
1052-
* This routine assumes that the caller has pinned and locked the buffer.
1053-
* Also, the given itemnos *must* appear in increasing order in the array.
1053+
* This routine assumes that the caller has pinned and write locked the
1054+
* buffer. Also, the given itemnos *must* appear in increasing order in the
1055+
* array.
10541056
*
10551057
* This is nearly the same as _bt_delitems_vacuum as far as what it does to
10561058
* the page, but it needs to generate its own recovery conflicts by accessing

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy