aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/funcs.c
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2024-11-08 16:34:41 -0500
committerPeter Geoghegan <pg@bowt.ie>2024-11-08 16:34:41 -0500
commitcaca6d8d276ce57473e97050d19dfe84e59482c8 (patch)
tree1dcf8914cb42c54e2a4f4dad8a4ad29849951637 /src/tutorial/funcs.c
parent4225276e25403e70de623ca9afd2c061cba24ccc (diff)
downloadpostgresql-caca6d8d276ce57473e97050d19dfe84e59482c8.tar.gz
postgresql-caca6d8d276ce57473e97050d19dfe84e59482c8.zip
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.
Diffstat (limited to 'src/tutorial/funcs.c')
0 files changed, 0 insertions, 0 deletions