From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove pg_replication_origin's TOAST table.
Date: Wed, 07 May 2025 19:48:50 +0000
Message-ID: <E1uCkl8-000f39-0E@gemulon.postgresql.org> (raw)
Remove pg_replication_origin's TOAST table.
A few places that access this catalog don't set up an active
snapshot before potentially accessing its TOAST table. However,
roname (the replication origin name) is the only varlena column, so
this is only a problem if the name requires out-of-line storage.
This commit removes its TOAST table to avoid needing to set up a
snapshot. It also places a limit on replication origin names so
that attempts to set long names will fail with a more user-friendly
error. Those chosen limit of 512 bytes should be sufficient to
avoid "row is too big" errors independent of BLCKSZ, but it should
also be lenient enough for all reasonable use-cases.
Bumps catversion.
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Euler Taveira <euler@eulerto.com>
Reviewed-by: Nisha Moond <nisha.moond412@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/ZvMSUPOqUU-VNADN%40nathan
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/16bf24e0e471c975f0877d6612eacdae7ce4a30e
Modified Files
--------------
doc/src/sgml/func.sgml | 1 +
src/backend/catalog/catalog.c | 2 --
src/backend/replication/logical/origin.c | 23 +++++++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_replication_origin.h | 2 --
src/include/replication/origin.h | 7 +++++++
src/test/regress/expected/misc_functions.out | 4 ++++
src/test/regress/expected/misc_sanity.out | 8 +++++++-
src/test/regress/sql/misc_functions.sql | 3 +++
src/test/regress/sql/misc_sanity.sql | 5 +++++
10 files changed, 51 insertions(+), 6 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Remove pg_replication_origin's TOAST table.
In-Reply-To: <E1uCkl8-000f39-0E@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox