Fix error with CREATE PUBLICATION, wal_level=minimal, and new tables.
authorNoah Misch <noah@leadboat.com>
Sat, 30 Jan 2021 08:11:38 +0000 (00:11 -0800)
committerNoah Misch <noah@leadboat.com>
Sat, 30 Jan 2021 08:11:38 +0000 (00:11 -0800)
commit360bd2321b1ad9c47466bc485ee5eb2f4515372e
treef8b6d8bc82dd72abed0c8beb50b9777cb5b5762d
parent8a54e12a38d1545d249f1402f66c8cde2837d97c
Fix error with CREATE PUBLICATION, wal_level=minimal, and new tables.

CREATE PUBLICATION has failed spuriously when applied to a permanent
relation created or rewritten in the current transaction.  Make the same
change to another site having the same semantic intent; the second
instance has no user-visible consequences.  Back-patch to v13, where
commit c6b92041d38512a4176ed76ad06f713d2e6c01a8 broke this.

Kyotaro Horiguchi

Discussion: https://postgr.es/m/20210113.160705.2225256954956139776.horikyota.ntt@gmail.com
src/backend/catalog/pg_publication.c
src/backend/optimizer/util/plancat.c
src/test/subscription/t/001_rep_changes.pl