The EXCEPT clause of a FOR ALL TABLES publication tracks each excluded
table by its identity rather than by name. As a result, renaming a table
or moving it to another schema with ALTER TABLE ... SET SCHEMA leaves the
exclusion in place, and the table stays excluded from the publication.
This behavior was not previously documented and could surprise users who
might reasonably expect a schema-qualified exclusion to apply only while
the table remains in that schema. Add a note to CREATE PUBLICATION to make
the behavior explicit.
Author: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/CAHut+PvQ5BqnawCQd6r1tqqd+iAJC-CuRY8wscuXSrpHGUzofA@mail.gmail.com
This clause specifies a list of tables to be excluded from the
publication.
</para>
+ <para>
+ Once a table is excluded, the exclusion applies to that table
+ regardless of its name or schema. Renaming the table or moving it to
+ another schema using <command>ALTER TABLE ... SET SCHEMA</command> does
+ not remove the exclusion.
+ </para>
<para>
For inherited tables, if <literal>ONLY</literal> is specified before the
table name, only that table is excluded from the publication. If