| From: | Amit Kapila <akapila(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Distinguish publication exclusions in object addresses. |
| Date: | 2026-09-17 03:50:38 |
| Message-ID: | E1x738w-000000003Nv-491B@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(dot)fujii(at)gmail(dot)com>
Author: Vignesh C <vignesh21(at)gmail(dot)com>
Reviewed-by: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Reviewed-by: Peter Smith <smithpb2250(at)gmail(dot)com>
Reviewed-by: Zhijie Hou <houzj(dot)fnst(at)fujitsu(dot)com>
Reviewed-by: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Reviewed-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Reviewed-by: Manuel Reyes Bravo <manuelreyesbravo(at)gmail(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-09-17 05:29:35 | pgsql: Fix assertion after aborting internal subtransaction at transact |
| Previous Message | Fujii Masao | 2026-09-17 03:36:34 | Re: pgsql: Revert online data checksum transitions |