Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Doc: Add "Attach Partition" limitation during logical replication.
authorAmit Kapila <akapila@postgresql.org>
Wed, 1 Dec 2021 04:56:59 +0000 (10:26 +0530)
committerAmit Kapila <akapila@postgresql.org>
Wed, 1 Dec 2021 04:56:59 +0000 (10:26 +0530)
ATTACHing a table into a partition tree whose root is published using a
publication with publish_via_partition_root set to true does not result in
the table's existing contents being replicated. This happens because
subscriber doesn't consider replicating the newly attached partition as
the root table is already in a 'ready' state.

This behavior was introduced in PG13 (83fd4532a7) where we allowed to
publish partition changes via ancestors.

We can consider fixing this limitation in the future.

Author: Amit Langote
Reviewed-by: Hou Zhijie, Amit Kapila
Backpatch-through: 13
Discussion: https://postgr.es/m/OS0PR01MB5716E97F00732B52DC2BBC2594989@OS0PR01MB5716.jpnprd01.prod.outlook.com

doc/src/sgml/ref/create_publication.sgml

index 2c5161729171b86c79dff92fc360b4cda25ae319..1205df5f88cac8d6e3c6f4530682c9968c13d9e0 100644 (file)
@@ -189,6 +189,13 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
    <command>UPDATE</command>, or it may not be published at all.
   </para>
 
+  <para>
+   <command>ATTACH</command>ing a table into a partition tree whose root is
+   published using a publication with <literal>publish_via_partition_root</literal>
+   set to <literal>true</literal> does not result in the table's existing contents
+   being replicated.
+  </para>
+
   <para>
    <command>COPY ... FROM</command> commands are published
    as <command>INSERT</command> operations.