diff options
author | Peter Geoghegan <pg@bowt.ie> | 2024-10-30 15:53:26 -0400 |
---|---|---|
committer | Peter Geoghegan <pg@bowt.ie> | 2024-10-30 15:53:26 -0400 |
commit | 492e6b54c604c39ecf5ebc812849185b20c4b1b6 (patch) | |
tree | 4e4866860b6cb3c01263b3af8f8817051f036a51 /src | |
parent | 81a25790f1f66319b4f088148b97dbb8badd4907 (diff) | |
download | postgresql-492e6b54c604c39ecf5ebc812849185b20c4b1b6.tar.gz postgresql-492e6b54c604c39ecf5ebc812849185b20c4b1b6.zip |
nbtree: assert no scheduled primscan between pages.
Follow-up to bugfix commit 763d65ae. Technically this new assertion is
redundant with the assertion recently added to _bt_readpage by that same
commit, but it seems like a good idea to have both.
The new assertion makes it clear that we expect to call _bt_readnextpage
when there's another primitive index scan scheduled, though only when
needed as the final step of ending the current primitive scan.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/access/nbtree/nbtsearch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c index b082cc80f6c..e718668ed69 100644 --- a/src/backend/access/nbtree/nbtsearch.c +++ b/src/backend/access/nbtree/nbtsearch.c @@ -2272,6 +2272,8 @@ _bt_readnextpage(IndexScanDesc scan, BlockNumber blkno, return false; } + Assert(!so->needPrimScan); + if (ScanDirectionIsForward(dir)) { /* read blkno, but check for interrupts first */ |