pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Burd <greg@burd.me>
To: pg@bowt.ie
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: nbtree: opt-in leaf key prefix compression
Date: Wed, 04 Nov 2026 17:38:49 +0000
Message-ID: <autsJ00Lz3RSy1OB@floki> (raw)
In-Reply-To: <7AFniRZ51Rofvz04_p1ypbJYNtVOdgj9Y093sxb6246oFoS4Z6kuwBdFvprrA_rXMA4Wf8CZlvF_PGSErXAaYg5_9yTB3KBcXKzKRPp7hXg=@burd.me>
References: <at-01F1wsXLRH0qo@floki>
	<CAH2-WznyrHYLaROHDtaZfYWn3u6hx7jpzsbpQO_vxk8jDFO8GA@mail.gmail.com>
	<7AFniRZ51Rofvz04_p1ypbJYNtVOdgj9Y093sxb6246oFoS4Z6kuwBdFvprrA_rXMA4Wf8CZlvF_PGSErXAaYg5_9yTB3KBcXKzKRPp7hXg=@burd.me>

On Wed, 04 Nov 2026 14:31:45 +0000, Greg Burd <greg@burd.me> wrote:
> 
> On Tuesday, November 3rd, 2026 at 4:48 PM, Peter Geoghegan <pg@bowt.ie> wrote:
> 
> > It seems likely that a design such as yours, which omits column-level
> > compression, will never incorporate it later on once committed. Why do
> > you think that's the best trade-off? I personally tend to doubt that
> > it is, but I've given it little thought so who knows?
> 
> Column-level compression is a great technique, and I'd like to see that
> happen too.  The time line for that is much longer primarily due to the
> many ways that table/index/executor all implicitly agree on one shape
> and one behavior defined by heap.  If we can more cleanly separate and
> define the boundaries between those three then we could potentially see
> that in core at some point, but I'll bet that takes a few years to sort
> out.  In the mean time, let's compress some key prefixes and save some
> bytes.
> 
> I think these two are not in competition, they are orthogonal and both
> is the answer but the easier of the two in today's code base is the
> prefix compression.

Quick follow-up...

I may have misunderstood "column-level" to mean "columnar" and if that's
the case I apologize.  I think you are talking more about key prefix
compression across multiple columns that together form the btree key,
and if that's the case then yes I agree that's something required of a
solution.  I'd been side-stepping this just for simplicity sake but I'll
think about it a bit and see if I can bring that into the design.

best.

-greg







view thread (12+ messages)  latest in thread

Message-ID: <autsJ00Lz3RSy1OB@floki>
Permalink:  ../autsJ00Lz3RSy1OB@floki/
Also on:    postgresql.org/message-id/autsJ00Lz3RSy1OB@floki

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: greg@burd.me, pg@bowt.ie, pgsql-hackers@lists.postgresql.org
  Subject: Re: nbtree: opt-in leaf key prefix compression
  In-Reply-To: <autsJ00Lz3RSy1OB@floki>

* 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