mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
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/18644-6866bbd22178ee16@postgresql.org
This commit is contained in:
parent
7175ef870e
commit
b8a046081c
@ -154,6 +154,21 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r
|
|||||||
This clause alters publication parameters originally set by
|
This clause alters publication parameters originally set by
|
||||||
<xref linkend="sql-createpublication"/>. See there for more information.
|
<xref linkend="sql-createpublication"/>. See there for more information.
|
||||||
</para>
|
</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>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user