pgsql: Add support for TOAST chunk_id type in binary upgrades - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Add support for TOAST chunk_id type in binary upgrades
Date
Msg-id E1x4qUN-00000004N7B-3J3e@gemulon.postgresql.org
Whole thread
List pgsql-committers
Add support for TOAST chunk_id type in binary upgrades

This commit adds a new SQL function able to set the type of a chunk_id
attribute for a TOAST table across binary upgrades.  The value is set
when the creation of a TOAST table is required across upgrades, in the
same fashion as the TOAST relation's oid and relfilenode.

Note that this piece currently works only with a TOAST table's chunk_id
set at OIDOID, because it is currently the only type of on-disk external
TOAST pointer supported.  This change is required for a follow-up
feature that aims to introduce support for 8-byte OIDs in external TOAST
pointers.

Taking care of this issue separately is less code churn for the next
changes, and perhaps some of the surrounding discussions with support
for different types of external on-disk TOAST pointers will find this
new facility useful.

Bump catalog version.

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/34fcd735f1ebd5efba8653cdbfbfd076b081660a

Modified Files
--------------
src/backend/catalog/heap.c                           |  1 +
src/backend/catalog/toasting.c                       | 20 +++++++++++++++++++-
src/backend/utils/adt/pg_upgrade_support.c           | 11 +++++++++++
src/bin/pg_dump/pg_dump.c                            | 14 +++++++++++---
src/include/catalog/binary_upgrade.h                 |  1 +
src/include/catalog/catversion.h                     |  2 +-
src/include/catalog/pg_proc.dat                      |  5 +++++
.../spgist_name_ops/expected/spgist_name_ops.out     |  6 ++++--
8 files changed, 53 insertions(+), 7 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pgsql: pg_plan_advice: Add CHECK_FOR_INTERRUPTS() and check_stack_depth
Next
From: Michael Paquier
Date:
Subject: pgsql: Add relation option toast_value_type