Skip to content

Commit b8a0460

Browse files
author
Amit Kapila
committed
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
1 parent 7175ef8 commit b8a0460

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/src/sgml/ref/alter_publication.sgml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,21 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <r
154154
This clause alters publication parameters originally set by
155155
<xref linkend="sql-createpublication"/>. See there for more information.
156156
</para>
157+
<caution>
158+
<para>
159+
Altering the <literal>publish_via_partition_root</literal> parameter can
160+
lead to data loss or duplication at the subscriber because it changes
161+
the identity and schema of the published tables. Note this happens only
162+
when a partition root table is specified as the replication target.
163+
</para>
164+
<para>
165+
This problem can be avoided by refraining from modifying partition leaf
166+
tables after the <command>ALTER PUBLICATION ... SET</command> until the
167+
<link linkend="sql-altersubscription"><command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command></link>
168+
is executed and by only refreshing using the <literal>copy_data = off</literal>
169+
option.
170+
</para>
171+
</caution>
157172
</listitem>
158173
</varlistentry>
159174

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy