Skip to content

Commit 492e6b5

Browse files
nbtree: assert no scheduled primscan between pages.
Follow-up to bugfix commit 763d65a. 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.
1 parent 81a2579 commit 492e6b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/access/nbtree/nbtsearch.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,6 +2272,8 @@ _bt_readnextpage(IndexScanDesc scan, BlockNumber blkno,
22722272
return false;
22732273
}
22742274

2275+
Assert(!so->needPrimScan);
2276+
22752277
if (ScanDirectionIsForward(dir))
22762278
{
22772279
/* read blkno, but check for interrupts first */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy