agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Disallow SET UNLOGGED for tables in a publication's EXCEPT claus
2+ messages / 1 participants
[nested] [flat]

* pgsql: Disallow SET UNLOGGED for tables in a publication's EXCEPT claus
@ 2026-09-14 04:15  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Amit Kapila @ 2026-09-14 04:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Disallow SET UNLOGGED for tables in a publication's EXCEPT clause.

Unlogged tables cannot be replicated, so they can neither be published nor
be named in a publication's EXCEPT clause.  ALTER TABLE ... SET UNLOGGED
checked only whether the table was published, so a table in an EXCEPT
clause could still be made unlogged, leaving a state that CREATE
PUBLICATION would reject and that pg_dump could not restore.

Author: Vignesh C <vignesh21@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: Zhijie Hou <houzj.fnst@fujitsu.com>
Discussion: https://postgr.es/m/CALDaNm1r2MkGu6h8zgU1Kj1sX-FcMQ7wGTeLSnhx-5joiyXEvg@mail.gmail.com
Backpatch-through: 19, where it was introduced

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7056ed4663f5ce4214cc1ebce42ec40f4400a7ea

Modified Files
--------------
src/backend/catalog/pg_publication.c      | 19 +++++++++++++++++++
src/backend/commands/tablecmds.c          | 13 +++++++------
src/include/catalog/pg_publication.h      |  1 +
src/test/regress/expected/publication.out | 10 ++++++++++
src/test/regress/sql/publication.sql      |  8 ++++++++
5 files changed, 45 insertions(+), 6 deletions(-)



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

* pgsql: Disallow SET UNLOGGED for tables in a publication's EXCEPT claus
@ 2026-09-14 04:15  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Amit Kapila @ 2026-09-14 04:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Disallow SET UNLOGGED for tables in a publication's EXCEPT clause.

Unlogged tables cannot be replicated, so they can neither be published nor
be named in a publication's EXCEPT clause.  ALTER TABLE ... SET UNLOGGED
checked only whether the table was published, so a table in an EXCEPT
clause could still be made unlogged, leaving a state that CREATE
PUBLICATION would reject and that pg_dump could not restore.

Author: Vignesh C <vignesh21@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: Zhijie Hou <houzj.fnst@fujitsu.com>
Discussion: https://postgr.es/m/CALDaNm1r2MkGu6h8zgU1Kj1sX-FcMQ7wGTeLSnhx-5joiyXEvg@mail.gmail.com
Backpatch-through: 19, where it was introduced

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/17d84c2b67f38cc3fc8b868c668297d59a299d97

Modified Files
--------------
src/backend/catalog/pg_publication.c      | 19 +++++++++++++++++++
src/backend/commands/tablecmds.c          | 13 +++++++------
src/include/catalog/pg_publication.h      |  1 +
src/test/regress/expected/publication.out | 10 ++++++++++
src/test/regress/sql/publication.sql      |  8 ++++++++
5 files changed, 45 insertions(+), 6 deletions(-)



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


end of thread, other threads:[~2026-09-14 04:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-14 04:15 pgsql: Disallow SET UNLOGGED for tables in a publication's EXCEPT claus Amit Kapila <akapila@postgresql.org>
2026-09-14 04:15 pgsql: Disallow SET UNLOGGED for tables in a publication's EXCEPT claus 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