Add _bt_binsrch() scantid assertion to nbtree.

Peter Geoghegan <pg@bowt.ie>

Commit: 55d015bde05311cbaaf16424e3aa05c37946cd8a
Author: Peter Geoghegan <pg@bowt.ie>
Date: 2019-09-09T18:41:19Z
Releases: 13.0
Add _bt_binsrch() scantid assertion to nbtree.

Assert that _bt_binsrch() binary searches with scantid set in insertion
scankey cannot be performed on leaf pages.  Leaf-level binary searches
where scantid is set must use _bt_binsrch_insert() instead.

_bt_binsrch_insert() is likely to have additional responsibilities in
the future, such as searching within GIN-style posting lists using
scantid.  It seems like a good idea to tighten things up now.

Files

PathChange+/−
src/backend/access/nbtree/nbtsearch.c modified +5 −3