| From: | Amit Kapila <akapila(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Disallow SET UNLOGGED for tables in a publication's EXCEPT claus |
| Date: | 2026-09-14 04:15:40 |
| Message-ID: | E1x5y6W-00000000EXL-03tZ@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(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: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Reviewed-by: Hayato Kuroda <kuroda(dot)hayato(at)fujitsu(dot)com>
Reviewed-by: Peter Smith <smithpb2250(at)gmail(dot)com>
Reviewed-by: Zhijie Hou <houzj(dot)fnst(at)fujitsu(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-09-14 05:12:21 | pgsql: doc: Mention REPACK in description of reloption toast_value_type |
| Previous Message | Richard Guo | 2026-09-14 03:31:59 | pgsql: Fix stale copies of PHVs in subqueries |