git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 81a2579)
nbtree: assert no scheduled primscan between pages.
2024年10月30日 19:53:26 +0000 (15:53 -0400)
2024年10月30日 19:53:26 +0000 (15:53 -0400)
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.


diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c
index b082cc80f6c854c2c13a6dc309a9d6e75b64f95a..e718668ed6915dfa207e4130f87486e721a07abf 100644 (file)
--- 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 */
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /