Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c9d6a45

Browse files
committed
doc: Document some nuances of logical replication of TRUNCATE
1 parent 8121ab8 commit c9d6a45

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

doc/src/sgml/logical-replication.sgml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,22 @@
371371
</para>
372372
</listitem>
373373

374+
<listitem>
375+
<para>
376+
Replication of <command>TRUNCATE</command> commands is supported, but
377+
some care must be taken when truncating groups of tables connected by
378+
foreign keys. When replicating a truncate action, the subscriber will
379+
truncate the same group of tables that was truncated on the publisher,
380+
either explictly specified or implicitly collected via
381+
<literal>CASCADE</literal>, minus tables that are not part of the
382+
subscription. This will work correctly if all affected tables are part
383+
of the same subscription. But if some tables to be truncated on the
384+
subscriber have foreign-key links to tables that are not part of the same
385+
(or any) subscription, then the application of the truncate action on the
386+
subscriber will fail.
387+
</para>
388+
</listitem>
389+
374390
<listitem>
375391
<para>
376392
Large objects (see <xref linkend="largeobjects"/>) are not replicated.

0 commit comments

Comments
 (0)