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 <[email protected]> Reviewed-by: Greg Burd <[email protected]> Reviewed-by: Bharath Rupireddy <[email protected]> Reviewed-by: Yugo Nagata <[email protected]> Discussion: https://postgr.es/m/[email protected] 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(-)
