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 <[email protected]> Reviewed-by: Amit Kapila <[email protected]> Reviewed-by: Chao Li <[email protected]> Reviewed-by: shveta malik <[email protected]> Reviewed-by: Hayato Kuroda <[email protected]> Reviewed-by: Peter Smith <[email protected]> Reviewed-by: Zhijie Hou <[email protected]> Discussion: https://postgr.es/m/caldanm1r2mkgu6h8zgu1kj1sx-fcmq7wgtelsnhx-5joiyx...@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(-)
