postgresql/src
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
..
backend Assert consistency of currPage that ended scan. 2024-11-08 16:34:41 -05:00
bin Add pg_constraint rows for not-null constraints 2024-11-08 13:28:48 +01:00
common Remove unused #include's from bin .c files 2024-11-06 11:11:52 +01:00
fe_utils Remove unused #include's from bin .c files 2024-11-06 11:11:52 +01:00
include Add pg_constraint rows for not-null constraints 2024-11-08 13:28:48 +01:00
interfaces Fix incorrect struct reference in comment 2024-10-23 16:13:28 +02:00
makefiles Use __attribute__((target(...))) for AVX-512 support. 2024-11-07 13:58:43 -06:00
pl Remove unused #include's from contrib, pl, test .c files 2024-10-28 08:02:17 +01:00
port Move check for USE_AVX512_POPCNT_WITH_RUNTIME_CHECK. 2024-11-08 14:25:28 -06:00
template thread-safety: gmtime_r(), localtime_r() 2024-08-23 07:43:04 +02:00
test Add pg_constraint rows for not-null constraints 2024-11-08 13:28:48 +01:00
timezone Update time zone data files to tzdata release 2024b. 2024-10-29 11:49:38 -04:00
tools Monkey-patch LLVM code to fix ARM relocation bug. 2024-11-06 23:17:18 +13:00
tutorial Update copyright for 2024 2024-01-03 20:49:05 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in Use __attribute__((target(...))) for AVX-512 support. 2024-11-07 13:58:43 -06:00
Makefile.shlib Remove AIX support 2024-02-28 15:17:23 +04:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00