Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xOexs-00000000GKh-3xON for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Nov 2026 17:40:03 +0000 Received: from localhost ([127.0.0.1]:52600 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xOewu-00000007bAs-0ZuU for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Nov 2026 17:39:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]:45434) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xOewt-00000007bAj-2v74 for pgsql-hackers@lists.postgresql.org; Wed, 04 Nov 2026 17:38:59 +0000 Received: from mail-244119.protonmail.ch ([109.224.244.119]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xOewr-00000000FPl-07HD for pgsql-hackers@lists.postgresql.org; Wed, 04 Nov 2026 17:38:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burd.me; s=protonmail; t=1793813934; x=1794073134; bh=Qz4gB+DgNGMeFwzyjAkOrKXoERg4Rqzbz+QcYefyitI=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=TAM5hf2sn3s0hAkwIuSlOdIiSbxdwwwdu+iVOTtXAhBlbsQUD4gMGUG5b8OEKoouc Eqkns94yxhO56ZRpVFsIgTOyA5Apf4rHvR3eq+rjUoUZ6t3U0vU4g5ZNk/x4mEUXQp icSnk8quxqZBA+OMg24CrO3wcw3kQhS+A08yTYU4mQ7SMHBe2NsMRWmrAP2g+VQCWZ C/OQDu61zMX9Xj2vcU1b6ngnR0xiITlU4kSKilcEO18U6j1TeO8dh9mDWl1sw3d1sA 1vr351yw7Pylre5jzXGjtOn0a5MYs8Ux+rujAukf4TzMsRbfmiLppnjTcSF4xQIRjZ E0V6BOgFkazTw== Date: Wed, 04 Nov 2026 17:38:49 +0000 To: pg@bowt.ie From: Greg Burd Cc: pgsql-hackers@lists.postgresql.org Subject: Re: nbtree: opt-in leaf key prefix compression Message-ID: In-Reply-To: <7AFniRZ51Rofvz04_p1ypbJYNtVOdgj9Y093sxb6246oFoS4Z6kuwBdFvprrA_rXMA4Wf8CZlvF_PGSErXAaYg5_9yTB3KBcXKzKRPp7hXg=@burd.me> References: <7AFniRZ51Rofvz04_p1ypbJYNtVOdgj9Y093sxb6246oFoS4Z6kuwBdFvprrA_rXMA4Wf8CZlvF_PGSErXAaYg5_9yTB3KBcXKzKRPp7hXg=@burd.me> Feedback-ID: 2668248:user:proton X-Pm-Message-ID: df9e14d85cc36fea8db0e6ea2ce87bd89fffe3e8 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 04 Nov 2026 14:31:45 +0000, Greg Burd wrote: >=20 > On Tuesday, November 3rd, 2026 at 4:48 PM, Peter Geoghegan w= rote: >=20 > > 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? >=20 > 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. >=20 > 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