]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Doc: Clarify that publication exclusions track table identity.
authorAmit Kapila <akapila@postgresql.org>
Thu, 18 Jun 2026 02:32:33 +0000 (08:02 +0530)
committerAmit Kapila <akapila@postgresql.org>
Thu, 18 Jun 2026 02:32:33 +0000 (08:02 +0530)
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

doc/src/sgml/ref/create_publication.sgml

index f82d640e6caee9106618e6d43f33873f537c5908..85cfcaddafa66089c8ce472b75767d6524b13573 100644 (file)
@@ -200,6 +200,12 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
       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