• Peter Geoghegan's avatar
    Refactor nbtree high key truncation. · 7c2dbc69
    Peter Geoghegan authored
    Simplify _bt_truncate(), the routine that generates truncated leaf page
    high keys.  Remove a micro-optimization that avoided a second palloc0()
    call (this was used when a heap TID was needed in the final pivot tuple,
    though only when the index happened to not be an INCLUDE index).
    
    Removing this dubious micro-optimization allows _bt_truncate() to use
    the index_truncate_tuple() indextuple.c utility routine in all cases.
    This was already the common case.
    
    This commit is a HEAD-only follow up to bugfix commit 4b42a899.
    7c2dbc69
nbtutils.c 83.8 KB