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

Commit091bd6b

Browse files
Update comments on nbtree stack struct.
Adjust the struct comment that describes how page splits use theirdescent stack to cascade up the tree from the leaf level.In passing, fix up some unrelated nbtree comments that had typos or wereobsolete.
1 parentc45643d commit091bd6b

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ _bt_buildadd(BTWriteState *wstate, BTPageState *state, IndexTuple itup)
953953
*
954954
* We don't try to bias our choice of split point to make it more
955955
* likely that _bt_truncate() can truncate away more attributes,
956-
* whereas the split pointpassed to _bt_split() is chosen much
956+
* whereas the split pointused within _bt_split() is chosen much
957957
* more delicately. Suffix truncation is mostly useful because it
958958
* improves space utilization for workloads with random
959959
* insertions. It doesn't seem worthwhile to add logic for

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ _bt_split_penalty(FindSplitData *state, SplitPoint *split)
10601060
}
10611061

10621062
/*
1063-
* Subroutine to get a lastleft IndexTuple for aspit point from page
1063+
* Subroutine to get a lastleft IndexTuple for asplit point from page
10641064
*/
10651065
staticinlineIndexTuple
10661066
_bt_split_lastleft(FindSplitData*state,SplitPoint*split)
@@ -1076,7 +1076,7 @@ _bt_split_lastleft(FindSplitData *state, SplitPoint *split)
10761076
}
10771077

10781078
/*
1079-
* Subroutine to get a firstright IndexTuple for aspit point from page
1079+
* Subroutine to get a firstright IndexTuple for asplit point from page
10801080
*/
10811081
staticinlineIndexTuple
10821082
_bt_split_firstright(FindSplitData*state,SplitPoint*split)

‎src/include/access/nbtree.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,11 @@ typedef struct BTMetaPageData
406406
* BTStackData -- As we descend a tree, we push the location of pivot
407407
* tuples whose downlink we are about to follow onto a private stack. If
408408
* we split a leaf, we use this stack to walk back up the tree and insert
409-
* data into its parent page at the correct location. We may also have to
410-
* recursively split a grandparent of the leaf page (and so on).
409+
* data into its parent page at the correct location. We also have to
410+
* recursively insert into the grandparent page if and when the parent page
411+
* splits. Our private stack can become stale due to concurrent page
412+
* splits and page deletions, but it should never give us an irredeemably
413+
* bad picture.
411414
*/
412415
typedefstructBTStackData
413416
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp