pgsql: Add relation option toast_value_type - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Add relation option toast_value_type
Date
Msg-id E1x4s1q-00000004Nip-1kAW@gemulon.postgresql.org
Whole thread
List 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@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.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(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Add support for TOAST chunk_id type in binary upgrades
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Remove unused global variables