Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd65b5cc

Browse files
Correct obsolete nbtsort.c minimum key comment.
It is no longer possible under any circumstances for nbtree code toreconstruct a strict lower bound key (parent page's pivot tuple key) fora right sibling page by retrieving the first item in the right siblingpage.
1 parente5f9786 commitd65b5cc

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

‎src/backend/access/nbtree/nbtsort.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,9 +1007,8 @@ _bt_buildadd(BTWriteState *wstate, BTPageState *state, IndexTuple itup)
10071007
pfree(state->btps_minkey);
10081008

10091009
/*
1010-
* Save a copy of the minimum key for the new page. We have to copy
1011-
* it off the old page, not the new one, in case we are not at leaf
1012-
* level.
1010+
* Save a copy of the high key from the old page. It is also used as
1011+
* the minimum key for the new page.
10131012
*/
10141013
state->btps_minkey=CopyIndexTuple(oitup);
10151014

@@ -1045,9 +1044,8 @@ _bt_buildadd(BTWriteState *wstate, BTPageState *state, IndexTuple itup)
10451044
* If the new item is the first for its page, stash a copy for later. Note
10461045
* this will only happen for the first item on a level; on later pages,
10471046
* the first item for a page is copied from the prior page in the code
1048-
* above. Since the minimum key for an entire level is only used as a
1049-
* minus infinity downlink, and never as a high key, there is no need to
1050-
* truncate away suffix attributes at this point.
1047+
* above. The minimum key for an entire level is nothing more than a
1048+
* minus infinity (downlink only) pivot tuple placeholder.
10511049
*/
10521050
if (last_off==P_HIKEY)
10531051
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp