pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Hannu Krosing <hannuk@google.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: John Naylor <johncnaylorls@gmail.com>
Cc: Greg Burd <greg@burd.me>
Cc: Yugo Nagata <nagata@sraoss.co.jp>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Support for 8-byte TOAST values, round two
Date: Thu, 1 Oct 2026 08:22:22 +0900
Message-ID: <ar2ZrnIR6OC14ppI@paquier.xyz> (raw)
In-Reply-To: <CAMT0RQSEvkAEXPtnWzuzQZovYscjQUeiVsSv_QfLQirdWuQ3wg@mail.gmail.com>
References: <CALj2ACVCicT3mWFD4Y-QsR+67THZ8J3FPmFtpTns2JxG3udGUQ@mail.gmail.com>
<aqd_gYs35v--sVlR@paquier.xyz>
<CALj2ACVLbSB1L+ObOhXE_ZS3ZVu50Cm-BsM5AGcc4grnO_F5JQ@mail.gmail.com>
<aqju1K96ex28yz2X@paquier.xyz>
<CANWCAZa+pWZL1Zjep1pz1F0sVWwNOQf+QfGErOaiUvC10Yr2XA@mail.gmail.com>
<CALj2ACUdXAngMaoPD_EFCPDha8AnqFwBmO8bOUgkucYOuYmf4w@mail.gmail.com>
<arI1As2FmhTYSaYZ@paquier.xyz>
<CALj2ACW1+23ikei=sB3EMV44EOE-vbbMA_dSXSOkOhj9QNVuUQ@mail.gmail.com>
<arOwskPgH8djIszw@paquier.xyz>
<CAMT0RQSEvkAEXPtnWzuzQZovYscjQUeiVsSv_QfLQirdWuQ3wg@mail.gmail.com>
On Wed, Sep 30, 2026 at 12:44:28PM +0200, Hannu Krosing wrote:
> In my insert tests 8-byte TOAST was much faster that 4-byte toast
>
> This resulted in a solid 23% speed-up because it didn't need to verify
> new OIDs against the unique index, despite each toast index entry
> taking up slightly more space (30.1 bytes vs. 21.4 bytes on average)
The speedup is not surprising. Thanks for posting some numbers.
A note about that. Postgres hackers had a meetup two weeks ago in
Tokyo where I have reported the activity of this thread, including the
fact that the new values are not rechecked in the INSERT path.
My opinion, same as upthread, is that a recheck is kind of pointless
because we should never go backwards under normal running conditions
and we would run out of LSNs before we reach the OID8 limit. I did
mention the argument of using pg_resetwal -o to go backwards, leading
to INSERT failures due to duplicates of the TOAST unique index.
Fujii-san had a more biased opinion than mine, mentioning that a
recheck could be a more defensive position, even if it costs in normal
running conditions.
Perhaps my opinion will be overruled in this release cycle, which is
fine, I just want to point out that the API toastid_valueid_exists()
is transparently able to work with a recheck of Oid8 values, so the
value recheck could be plugged in for this case as well, depending on
how the discussion flows. Perhaps there is a bug I am not aware of
yet, that could justify the recheck, of course.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
view thread (72+ messages)
Message-ID: <ar2ZrnIR6OC14ppI@paquier.xyz> Permalink: ../ar2ZrnIR6OC14ppI@paquier.xyz/ Also on: postgresql.org/message-id/ar2ZrnIR6OC14ppI@paquier.xyz ·
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: michael@paquier.xyz, hannuk@google.com, bharath.rupireddyforpostgres@gmail.com, johncnaylorls@gmail.com, greg@burd.me, nagata@sraoss.co.jp, pgsql-hackers@lists.postgresql.org Subject: Re: Support for 8-byte TOAST values, round two In-Reply-To: <ar2ZrnIR6OC14ppI@paquier.xyz> * 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