diff options
| author | Peter Geoghegan | 2019-02-26 00:54:18 +0000 |
|---|---|---|
| committer | Peter Geoghegan | 2019-02-26 00:54:18 +0000 |
| commit | 067786cea0f150ccf9350abb9a5ac3e4ad328804 (patch) | |
| tree | d4adfc2ec8a16ffd6360312302db1cac3603564d | |
| parent | b6926dee0e1304368964e1161bfd60dd4b01b25d (diff) | |
Correct obsolete nbtree page deletion comment.
Commit efada2b8e92, 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.
| -rw-r--r-- | src/backend/access/nbtree/nbtpage.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c index 1d72fe54081..300daf915da 100644 --- a/src/backend/access/nbtree/nbtpage.c +++ b/src/backend/access/nbtree/nbtpage.c @@ -1124,9 +1124,10 @@ _bt_is_page_halfdead(Relation rel, BlockNumber blk) * * "child" is the leaf page we wish to delete, and "stack" is a search stack * leading to it (approximately). Note that we will update the stack - * entry(s) to reflect current downlink positions --- this is harmless and - * indeed saves later search effort in _bt_pagedel. The caller should - * initialize *target and *rightsib to the leaf page and its right sibling. + * entry(s) to reflect current downlink positions --- this is essentially the + * same as the corresponding step of splitting, and is not expected to affect + * caller. The caller should initialize *target and *rightsib to the leaf + * page and its right sibling. * * Note: it's OK to release page locks on any internal pages between the leaf * and *topparent, because a safe deletion can't become unsafe due to |
