Add toast tables to most system catalogs

Enterprise / PostgreSQL - Michael Paquier [paquier.xyz] - 19 July 2018 22:43 EDT

It has been project policy to create toast tables only for those catalogs that might reasonably need one. Since this judgment call can change over time, just create one for every catalog, as this can be useful when creating rather-long entries in catalogs, with recent examples being in the shape of policy expressions or customly-formatted SCRAM verifiers.

To prevent circular dependencies and to avoid adding complexity to VACUUM FULL logic, exclude pg_class, pg_attribute, and pg_index. Also, to prevent pg_upgrade from seeing a non-empty new cluster, exclude pg_largeobject and pg_largeobject_metadata from the set as large object data is handled as user data. Those relations have no reason to use a toast table anyway.

Author: Joe Conway, John Naylor

96cdeae07f Add toast tables to most system catalogs
src/backend/catalog/catalog.c | 18 +++++--
src/include/catalog/toasting.h | 40 ++++++++++++++--
src/test/regress/expected/misc_sanity.out | 80 +++++++++----------------------
src/test/regress/sql/misc_sanity.sql | 12 +++--
4 files changed, 82 insertions(+), 68 deletions(-)

Upstream: git.postgresql.org


  • Share