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:12:05 +0000 (00:12 -0800)
commite8e3e67490f593a3669c762b50b2aa3a11208654
treefbcf2f343f2d7cac2e2f816548f90ec050eef986
parent86a5b309c9330661fd2c4c46e4dc7f07cca139e1
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