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: nbtree: Pass down MAXALIGN()'d itemsz for new item.
Date: Mon, 16 Mar 2020 19:00:42 +0000
Message-ID: <E1jDuyg-0000hV-FA@gemulon.postgresql.org> (raw)

nbtree: Pass down MAXALIGN()'d itemsz for new item.

Refactor nbtinsert.c so that the final itemsz of each new non-pivot
tuple (the MAXALIGN()'d size) is determined once.  Most of the functions
used by leaf page inserts used the insertstate.itemsz value already.
This commit makes everything use insertstate.itemsz as standard
practice.  The goal is to decouple tuple size from "effective" tuple
size.  Making this distinction isn't truly necessary right now, but that
might change in the future.

Also explain why we consistently apply MAXALIGN() to get an effective
index tuple size.  This was rather unclear, in part because it isn't
actually strictly necessary right now.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/013c1f6af6c5017d97b1268cf9a5fa3d0575eecb

Modified Files
--------------
src/backend/access/nbtree/nbtinsert.c | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)



Message-ID: <E1jDuyg-0000hV-FA@gemulon.postgresql.org>
Permalink:  ../E1jDuyg-0000hV-FA@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jDuyg-0000hV-FA@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: nbtree: Pass down MAXALIGN()'d itemsz for new item.
  In-Reply-To: <E1jDuyg-0000hV-FA@gemulon.postgresql.org>
  References: <E1jDuyg-0000hV-FA@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