Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce72e7e

Browse files
Fix obsolete nbtree array advancement comment.
Checking if another primitive scan is required after all once the next leaf page was moved from _bt_checkkeys to its _bt_readpage caller by commit 9a2e2a2. Update a comment that incorrectly described the recheck mechanism as something that takes place in _bt_checkkeys. Also fix an older typo in related code comments.
1 parent b75fedc commit ce72e7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/access/nbtree/nbtutils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ _bt_rewind_nonrequired_arrays(IndexScanDesc scan, ScanDirection dir)
11101110
*
11111111
* readpagetup callers must only call here when _bt_check_compare already set
11121112
* continuescan=false. We help these callers deal with _bt_check_compare's
1113-
* inability to distinguishing between the < and > cases (it uses equality
1113+
* inability to distinguish between the < and > cases (it uses equality
11141114
* operator scan keys, whereas we use 3-way ORDER procs). These callers pass
11151115
* a _bt_check_compare-set sktrig value that indicates which scan key
11161116
* triggered the call (!readpagetup callers just pass us sktrig=0 instead).
@@ -1950,7 +1950,7 @@ _bt_advance_array_keys(IndexScanDesc scan, BTReadPageState *pstate,
19501950
* keys for one or more truncated attribute values (scan keys required in
19511951
* _either_ scan direction).
19521952
*
1953-
* There is a chance that _bt_checkkeys (which checks so->scanBehind) will
1953+
* There is a chance that _bt_readpage (which checks so->scanBehind) will
19541954
* find that even the sibling leaf page's finaltup is < the new array
19551955
* keys. When that happens, our optimistic policy will have incurred a
19561956
* single extra leaf page access that could have been avoided.

0 commit comments

Comments
 (0)