postgresql/src/backend/access
Peter Geoghegan caca6d8d27 Assert consistency of currPage that ended scan.
When _bt_readnextpage is called with our nbtree parallel scan already
seized (i.e. when it is directly called by _bt_first), we never expect a
prior call to _bt_readpage for lastcurrblkno to already indicate that
the 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 have
finished by the time our backend reaches _bt_first/_bt_readnextpage).

Add a documenting assertion to the path where _bt_readnextpage ends the
parallel scan based on information about lastcurrblkno from so->currPos.
Assert that the most recent _bt_readpage call that set so->currPos is in
fact lastcurrblkno's _bt_readpage call.

Follow-up to bugfix commit b5ee4e52.
2024-11-08 16:34:41 -05:00
..
brin Remove unused #include's from backend .c files 2024-10-27 08:26:50 +01:00
common Turn a few 'validnsps' static variables into locals 2024-08-06 23:03:43 +03:00
gin Remove unused #include's from backend .c files 2024-10-27 08:26:50 +01:00
gist Remove an obsolete comment in gistinsert() 2024-11-07 15:13:50 +09:00
hash Allow _h_indexbuild() to be interrupted. 2024-09-13 16:17:04 -04:00
heap Remove unused variable 2024-11-06 15:11:14 +01:00
index Unpin buffer before inplace update waits for an XID to end. 2024-10-29 09:39:55 -07:00
nbtree Assert consistency of currPage that ended scan. 2024-11-08 16:34:41 -05:00
rmgrdesc For inplace update, send nontransactional invalidations. 2024-10-25 06:51:02 -07:00
sequence Remove unused #include's from backend .c files 2024-10-27 08:26:50 +01:00
spgist Replace gratuitous memmove() with memcpy() 2024-09-11 15:21:36 +02:00
table Improve Asserts checking relation matching in parallel scans. 2024-09-20 16:37:55 -04:00
tablesample Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
transam Improve fix for not entering parallel mode when holding interrupts. 2024-11-08 13:42:10 -05:00
Makefile Introduce sequence_*() access functions 2024-02-26 16:04:59 +09:00
meson.build Introduce sequence_*() access functions 2024-02-26 16:04:59 +09:00