Doc: Add a caution in alter publication.
authorAmit Kapila
Fri, 25 Oct 2024 08:49:05 +0000 (14:19 +0530)
committerAmit Kapila
Fri, 25 Oct 2024 08:49:05 +0000 (14:19 +0530)
Clarify that altering the 'publish_via_partition_root' option can lead to
data loss or duplication when a partition root table is specified as the
replication target.

Reported-by: Maxim Boguk
Author: Hayato Kuroda
Reviewed-by: Amit Kapila, Peter Smith, Vignesh C
Discussion: https://postgr.es/m/18644-6866bbd22178ee16@postgresql.org

doc/src/sgml/ref/alter_publication.sgml

index 44ae7e0e871c89eb86c959e3fec04f880ec87606..d5ea383e8bc9578a81554d9fb9c9ff9d06b18bee 100644 (file)
@@ -154,6 +154,21 @@ ALTER PUBLICATION name RENAME TO 
       This clause alters publication parameters originally set by
       .  See there for more information.
      
+     
+      
+       Altering the publish_via_partition_root parameter can
+       lead to data loss or duplication at the subscriber because it changes
+       the identity and schema of the published tables. Note this happens only
+       when a partition root table is specified as the replication target.
+      
+      
+       This problem can be avoided by refraining from modifying partition leaf
+       tables after the ALTER PUBLICATION ... SET until the
+       ALTER SUBSCRIPTION ... REFRESH PUBLICATION
+       is executed and by only refreshing using the copy_data = off
+       option.
+      
+