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

Commit8e167e6

Browse files
nbtree: refine _bt_readnextpage contract comments.
Another minor follow-up commit for commit1bd4bc8, which changed the_bt_readnextpage contract.
1 parent088f8e2 commit8e167e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2183,7 +2183,9 @@ _bt_readfirstpage(IndexScanDesc scan, OffsetNumber offnum, ScanDirection dir)
21832183
* scan. A seized=false caller's blkno can never be assumed to be the page
21842184
* that must be read next during a parallel scan, though. We must figure that
21852185
* part out for ourselves by seizing the scan (the correct page to read might
2186-
* already be beyond the seized=false caller's blkno during a parallel scan).
2186+
* already be beyond the seized=false caller's blkno during a parallel scan,
2187+
* unless blkno/so->currPos.nextPage/so->currPos.prevPage is already P_NONE,
2188+
* or unless so->currPos.moreRight/so->currPos.moreLeft is already unset).
21872189
*
21882190
* On success exit, so->currPos is updated to contain data from the next
21892191
* interesting page, and we return true. We hold a pin on the buffer on
@@ -2204,6 +2206,7 @@ _bt_readnextpage(IndexScanDesc scan, BlockNumber blkno,
22042206
BTScanOpaqueso= (BTScanOpaque)scan->opaque;
22052207

22062208
Assert(so->currPos.currPage==lastcurrblkno||seized);
2209+
Assert(!(blkno==P_NONE&&seized));
22072210
Assert(!BTScanPosIsPinned(so->currPos));
22082211

22092212
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp