agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor some TOAST value ID code to use Oid8 instead of Oid
Date: Mon, 14 Sep 2026 01:01:47 +0000
Message-ID: <E1x5v4t-00000000D4z-1pU2@gemulon.postgresql.org> (raw)

Refactor some TOAST value ID code to use Oid8 instead of Oid

This is a mechanical update to change most of the TOAST code paths that
assume TOAST value IDs to be Oid variables to become Oid8 variables,
easing an the introduction of an upcoming patch to allow larger TOAST
values, at 8 bytes.

The areas touched by the change are related to table AM, amcheck and
logical decoding's reorder buffer.  A good chunk of the changes involve
switching printf() markers from %u to OID8_FORMAT.

For the sake of the release notes in terms of compatibility (perhaps
worth mentioning, or not), note that this changes some callback
definitions in the table AM section, upgrading some TOAST callbacks to
use Oid8 instead of Oid when referring to a TOAST value.

Author: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Greg Burd <greg@burd.me>
Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: Yugo Nagata <nagata@sraoss.co.jp>
Discussion: https://postgr.es/m/af19kUjwjhaoUTLn@paquier.xy

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/072d4c4240572980b9c101ff5d2b85e656e79275

Modified Files
--------------
contrib/amcheck/verify_heapam.c                 | 55 ++++++++++++++-----------
src/backend/access/common/toast_internals.c     |  8 ++--
src/backend/access/heap/heaptoast.c             | 12 +++---
src/backend/replication/logical/reorderbuffer.c | 14 ++++---
src/include/access/heaptoast.h                  |  2 +-
src/include/access/tableam.h                    |  4 +-
6 files changed, 52 insertions(+), 43 deletions(-)



Message-ID: <E1x5v4t-00000000D4z-1pU2@gemulon.postgresql.org>
Permalink:  ../E1x5v4t-00000000D4z-1pU2@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1x5v4t-00000000D4z-1pU2@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Refactor some TOAST value ID code to use Oid8 instead of Oid
  In-Reply-To: <E1x5v4t-00000000D4z-1pU2@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox