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: Refactor nbtree high key truncation.
Date: Mon, 30 Mar 2020 22:54:03 +0000
Message-ID: <E1jJ3IB-0004cc-Ld@gemulon.postgresql.org> (raw)

Refactor nbtree high key truncation.

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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7c2dbc691c3e19b7d33c78f6c8aacc6e0cab510b

Modified Files
--------------
src/backend/access/nbtree/nbtutils.c | 130 ++++++++++++-----------------------
1 file changed, 45 insertions(+), 85 deletions(-)



Message-ID: <E1jJ3IB-0004cc-Ld@gemulon.postgresql.org>
Permalink:  ../E1jJ3IB-0004cc-Ld@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jJ3IB-0004cc-Ld@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: Refactor nbtree high key truncation.
  In-Reply-To: <E1jJ3IB-0004cc-Ld@gemulon.postgresql.org>
  References: <E1jJ3IB-0004cc-Ld@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