forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcaca6d8
committed
Assert consistency of currPage that ended scan.
When _bt_readnextpage is called with our nbtree parallel scan alreadyseized (i.e. when it is directly called by _bt_first), we never expect aprior call to _bt_readpage for lastcurrblkno to already indicate thatthe scan should end -- the _bt_first caller's blkno must always be read.After all, the "prior" _bt_readpage call (the call for lastcurrblkno)probably took place in some other backend (and it might not even havefinished by the time our backend reaches _bt_first/_bt_readnextpage).Add a documenting assertion to the path where _bt_readnextpage ends theparallel scan based on information about lastcurrblkno from so->currPos.Assert that the most recent _bt_readpage call that set so->currPos is infact lastcurrblkno's _bt_readpage call.Follow-up to bugfix commitb5ee4e5.1 parent4225276 commitcaca6d8
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2230 | 2230 | | |
2231 | 2231 | | |
2232 | 2232 | | |
| 2233 | + | |
2233 | 2234 | | |
2234 | | - | |
| 2235 | + | |
2235 | 2236 | | |
2236 | 2237 | | |
2237 | 2238 | | |
| |||
0 commit comments
Comments
(0)