pgsql: Add relation option toast_value_type

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add relation option toast_value_type
Date: 2026-09-11 03:34:19
Message-ID: E1x4s1q-00000004Nip-1kAW@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add relation option toast_value_type

This relation option gives the possibility to define the attribute type
that can be used for chunk_id in a TOAST table when it is initially
created. An update of this parameter has no effect if a TOAST table
already exists under the relation, even on rewrites. It cannot be set
for TOAST relations.

This new option can be set only to "oid" as of this commit. This
feature is extracted as a patch of its own to ease the introduction of a
second mode in a follow-up change, related to the introduction of 8-byte
OIDs in external TOAST pointers.

Bump catalog version, as StdRdOptions has changed.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f33844889bb6950f9c207b9ea4830947f1e1f50e

Modified Files
--------------
doc/src/sgml/ref/create_table.sgml | 26 ++++++++++++++++++++++++++
src/backend/access/common/reloptions.c | 21 +++++++++++++++++++++
src/backend/catalog/toasting.c | 16 ++++++++++++++++
src/bin/psql/tab-complete.in.c | 1 +
src/include/catalog/catversion.h | 2 +-
src/include/utils/rel.h | 17 +++++++++++++++++
src/test/regress/expected/reloptions.out | 22 ++++++++++++++++++++++
src/test/regress/sql/reloptions.sql | 12 ++++++++++++
src/tools/pgindent/typedefs.list | 1 +
9 files changed, 117 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2026-09-11 04:27:30 pgsql: Validate ALTER PUBLICATION after acquiring the publication lock.
Previous Message Michael Paquier 2026-09-11 02:05:22 pgsql: Add static assertion to track the no-padding rule of varatt_exte