Make _bt_keep_natts_fast() use datum_image_eq().
Peter Geoghegan <pg@bowt.ie>
Make _bt_keep_natts_fast() use datum_image_eq(). An upcoming patch that adds deduplication to the nbtree AM will rely on _bt_keep_natts_fast() understanding that differences in TOAST input state can never affect its answer. In particular, two opclass-equal datums (with opclasses deemed safe for deduplication) should never be treated as unequal by _bt_keep_natts_fast() due to TOAST input differences. This also seems like a good idea on general principle. nbtsplitloc.c will now occasionally make better decisions about where to split a leaf page. The behavior of _bt_keep_natts_fast() is now somewhat closer to the behavior of _bt_keep_natts(). Discussion: https://postgr.es/m/CAH2-Wzn3Ee49Gmxb7V1VJ3-AC8fWn-Fr8pfWQebHe8rYRxt5OQ@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/nbtree/nbtutils.c | modified | +2 −4 |
Discussion
- Building infrastructure for B-Tree deduplication that recognizes when opclass equality is also equivalence 33 messages · 2019-08-25 → 2020-02-14