aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonb.c
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2020-03-18 18:17:37 -0700
committerPeter Geoghegan <pg@bowt.ie>2020-03-18 18:17:37 -0700
commit6312c08a291fc34068571ec64ee439f2674d739a (patch)
tree7659aab0202ae38facaa35c926f25422656d5cad /src/backend/utils/adt/jsonb.c
parentd41202f36eed97a4ee68a6a9f5fcca314f12c35d (diff)
downloadpostgresql-6312c08a291fc34068571ec64ee439f2674d739a.tar.gz
postgresql-6312c08a291fc34068571ec64ee439f2674d739a.zip
nbtree: Use raw PageAddItem() for retail inserts.
Only internal page splits need to call _bt_pgaddtup() instead of PageAddItem(), and only for data items, one of which will end up at the first offset (or first offset after the high key offset) on the new right page. This data item alone will need to be truncated in _bt_pgaddtup(). Since there is no reason why retail inserts ever need to truncate the incoming item, use a raw PageAddItem() call there instead. Even _bt_split() uses raw PageAddItem() calls for left page and right page high keys. Clearly the _bt_pgaddtup() shim function wasn't really encapsulating anything. _bt_pgaddtup() should now be thought of as a _bt_split() helper function. Note that the assertions from commit d1e241c2 verify that retail inserts never insert an item at an internal page's negative infinity offset. This invariant could only ever be violated as a result of a basic logic error in nbtinsert.c.
Diffstat (limited to 'src/backend/utils/adt/jsonb.c')
0 files changed, 0 insertions, 0 deletions