agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Distinguish publication exclusions in object addresses.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Distinguish publication exclusions in object addresses.
@ 2026-09-17 03:50 Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Amit Kapila @ 2026-09-17 03:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/94670ba6d560b0738992b9bb7d0313d7d90af1d1

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Distinguish publication exclusions in object addresses.
@ 2026-09-17 03:50 Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Amit Kapila @ 2026-09-17 03:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-09-17 03:50 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 03:50 pgsql: Distinguish publication exclusions in object addresses. Amit Kapila <akapila@postgresql.org>
2026-09-17 03:50 pgsql: Distinguish publication exclusions in object addresses. Amit Kapila <akapila@postgresql.org>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox