Skip to content

Commit 067786c

Browse files
Correct obsolete nbtree page deletion comment.
Commit efada2b, which made the nbtree page deletion algorithm more robust, removed _bt_getstackbuf() calls from _bt_pagedel(). It failed to update a comment that referenced the earlier approach. Update the comment to explain that the _bt_getstackbuf() page deletion call site mirrors the only other remaining _bt_getstackbuf() call site, which is reached during page splits.
1 parent b6926de commit 067786c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/backend/access/nbtree/nbtpage.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,9 +1124,10 @@ _bt_is_page_halfdead(Relation rel, BlockNumber blk)
11241124
*
11251125
* "child" is the leaf page we wish to delete, and "stack" is a search stack
11261126
* leading to it (approximately). Note that we will update the stack
1127-
* entry(s) to reflect current downlink positions --- this is harmless and
1128-
* indeed saves later search effort in _bt_pagedel. The caller should
1129-
* initialize *target and *rightsib to the leaf page and its right sibling.
1127+
* entry(s) to reflect current downlink positions --- this is essentially the
1128+
* same as the corresponding step of splitting, and is not expected to affect
1129+
* caller. The caller should initialize *target and *rightsib to the leaf
1130+
* page and its right sibling.
11301131
*
11311132
* Note: it's OK to release page locks on any internal pages between the leaf
11321133
* and *topparent, because a safe deletion can't become unsafe due to

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