diff options
author | Amit Kapila | 2024-10-25 08:49:05 +0000 |
---|---|---|
committer | Amit Kapila | 2024-10-25 08:49:05 +0000 |
commit | b8a046081c43ce4a0a462812165f34b6026e60ef (patch) | |
tree | 6175db9efb632d1c1e475ff17881403b934cfb96 /doc/src | |
parent | 7175ef870e24763a561821685160c5e35b2e8989 (diff) |
Doc: Add a caution in alter publication.
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/[email protected]
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/alter_publication.sgml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/alter_publication.sgml b/doc/src/sgml/ref/alter_publication.sgml index 44ae7e0e871..d5ea383e8bc 100644 --- a/doc/src/sgml/ref/alter_publication.sgml +++ b/doc/src/sgml/ref/alter_publication.sgml @@ -154,6 +154,21 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r This clause alters publication parameters originally set by <xref linkend="sql-createpublication"/>. See there for more information. </para> + <caution> + <para> + Altering the <literal>publish_via_partition_root</literal> 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. + </para> + <para> + This problem can be avoided by refraining from modifying partition leaf + tables after the <command>ALTER PUBLICATION ... SET</command> until the + <link linkend="sql-altersubscription"><command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command></link> + is executed and by only refreshing using the <literal>copy_data = off</literal> + option. + </para> + </caution> </listitem> </varlistentry> |