agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Distinguish publication exclusions in object addresses.
Date: Thu, 17 Sep 2026 03:50:38 +0000
Message-ID: <E1x738w-000000003Nv-491B@gemulon.postgresql.org> (raw)
Distinguish publication exclusions in object addresses.
A pg_publication_rel entry can represent either an explicitly published
relation or a table excluded from a FOR ALL TABLES publication, but the
object address code treated every entry as a published relation without
checking prexcept. EXCEPT entries thus appeared as ordinary
published-table mappings in dependency messages, pg_identify_object(),
and pg_identify_object_as_address().
Report such entries as "publication excluded relation" instead, with
object identities indicating that the table is excluded from the
publication. pg_get_object_address() also accepts this new object type,
so that the output of pg_identify_object_as_address() can still be
passed back to it to look up the same object. "publication relation"
now resolves only non-EXCEPT entries, and "publication excluded
relation" only EXCEPT entries.
Oversight in commit fd366065e06.
Author: Fujii Masao <masao.fujii@gmail.com>
Author: Vignesh C <vignesh21@gmail.com>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: Zhijie Hou <houzj.fnst@fujitsu.com>
Reviewed-by: Nisha Moond <nisha.moond412@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Manuel Reyes Bravo <manuelreyesbravo@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwHfESBexa7fq99EvFCf31av=O9h9udnw22ymxmm6LMZzw@mail.gmail.com
Backpatch-through: 19, where it was introduced
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/91ff666f1d81ddbcbd4ba93ef4457f8bb02d8d3e
Modified Files
--------------
src/backend/catalog/aclchk.c | 2 +
src/backend/catalog/objectaddress.c | 141 +++++++++++++++++++++++----
src/backend/commands/dropcmds.c | 1 +
src/backend/commands/event_trigger.c | 2 +
src/backend/commands/seclabel.c | 1 +
src/include/nodes/parsenodes.h | 1 +
src/test/regress/expected/object_address.out | 26 ++++-
src/test/regress/expected/publication.out | 35 +++++++
src/test/regress/sql/object_address.sql | 20 +++-
src/test/regress/sql/publication.sql | 29 ++++++
10 files changed, 235 insertions(+), 23 deletions(-)
view thread (2+ messages)
Message-ID: <E1x738w-000000003Nv-491B@gemulon.postgresql.org>
Permalink: ../E1x738w-000000003Nv-491B@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1x738w-000000003Nv-491B@gemulon.postgresql.org
reply
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: akapila@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Distinguish publication exclusions in object addresses.
In-Reply-To: <E1x738w-000000003Nv-491B@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox