pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make _bt_keep_natts_fast() use datum_image_eq().
Date: Tue, 12 Nov 2019 21:09:56 +0000
Message-ID: <E1iUdQC-0005pQ-98@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1f55ebae27225111d0a5c4d89d7e77d917357ff4

Modified Files
--------------
src/backend/access/nbtree/nbtutils.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)



Message-ID: <E1iUdQC-0005pQ-98@gemulon.postgresql.org>
Permalink:  ../E1iUdQC-0005pQ-98@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iUdQC-0005pQ-98@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: pg@bowt.ie
  Subject: Re: pgsql: Make _bt_keep_natts_fast() use datum_image_eq().
  In-Reply-To: <E1iUdQC-0005pQ-98@gemulon.postgresql.org>
  References: <E1iUdQC-0005pQ-98@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox