@ -253,7 +253,7 @@
will be filled with the default value as specified in the definition of the
will be filled with the default value as specified in the definition of the
target table. However, logical replication in binary format is more
target table. However, logical replication in binary format is more
restrictive. See the
restrictive. See the
<link linkend="sql-createsubscription-with-binary"><literal>binary</literal></link>
<link linkend="sql-createsubscription-params- with-binary"><literal>binary</literal></link>
option of <command>CREATE SUBSCRIPTION</command> for details.
option of <command>CREATE SUBSCRIPTION</command> for details.
</para>
</para>
@ -371,7 +371,7 @@ INSERT 0 3
<para>
<para>
Create publications for the tables. The publications <literal>pub2</literal>
Create publications for the tables. The publications <literal>pub2</literal>
and <literal>pub3a</literal> disallow some
and <literal>pub3a</literal> disallow some
<link linkend="sql-createpublication-with-publish"><literal>publish</literal></link>
<link linkend="sql-createpublication-params- with-publish"><literal>publish</literal></link>
operations. The publication <literal>pub3b</literal> has a row filter (see
operations. The publication <literal>pub3b</literal> has a row filter (see
<xref linkend="logical-replication-row-filter"/>).
<xref linkend="logical-replication-row-filter"/>).
<programlisting>
<programlisting>
@ -593,7 +593,7 @@ ALTER SUBSCRIPTION
<para>
<para>
Example 2: Where the subscription says <literal>connect = false</literal>,
Example 2: Where the subscription says <literal>connect = false</literal>,
but also specifies the
but also specifies the
<link linkend="sql-createsubscription-with-slot-name"><literal>slot_name</literal></link>
<link linkend="sql-createsubscription-params- with-slot-name"><literal>slot_name</literal></link>
option.
option.
<itemizedlist>
<itemizedlist>
<listitem>
<listitem>
@ -712,7 +712,7 @@ ALTER SUBSCRIPTION
then the row is not replicated. The <literal>WHERE</literal> clause expression
then the row is not replicated. The <literal>WHERE</literal> clause expression
is evaluated with the same role used for the replication connection (i.e.
is evaluated with the same role used for the replication connection (i.e.
the role specified in the
the role specified in the
<link linkend="sql-createsubscription-connection"><literal>CONNECTION</literal></link>
<link linkend="sql-createsubscription-params- connection"><literal>CONNECTION</literal></link>
clause of the <xref linkend="sql-createsubscription"/>). Row filters have
clause of the <xref linkend="sql-createsubscription"/>). Row filters have
no effect for <command>TRUNCATE</command> command.
no effect for <command>TRUNCATE</command> command.
</para>
</para>
@ -805,7 +805,7 @@ ALTER SUBSCRIPTION
<para>
<para>
If the publication contains a partitioned table, the publication parameter
If the publication contains a partitioned table, the publication parameter
<link linkend="sql-createpublication-with-publish-via-partition-root"><literal>publish_via_partition_root</literal></link>
<link linkend="sql-createpublication-params- with-publish-via-partition-root"><literal>publish_via_partition_root</literal></link>
determines which row filter is used. If <literal>publish_via_partition_root</literal>
determines which row filter is used. If <literal>publish_via_partition_root</literal>
is <literal>true</literal>, the <emphasis>root partitioned table's</emphasis>
is <literal>true</literal>, the <emphasis>root partitioned table's</emphasis>
row filter is used. Otherwise, if <literal>publish_via_partition_root</literal>
row filter is used. Otherwise, if <literal>publish_via_partition_root</literal>
@ -834,7 +834,7 @@ ALTER SUBSCRIPTION
<warning>
<warning>
<para>
<para>
Because initial data synchronization does not take into account the
Because initial data synchronization does not take into account the
<link linkend="sql-createpublication-with-publish"><literal>publish</literal></link>
<link linkend="sql-createpublication-params- with-publish"><literal>publish</literal></link>
parameter when copying existing table data, some rows may be copied that
parameter when copying existing table data, some rows may be copied that
would not be replicated using DML. Refer to
would not be replicated using DML. Refer to
<xref linkend="logical-replication-snapshot"/>, and see
<xref linkend="logical-replication-snapshot"/>, and see
@ -858,7 +858,7 @@ ALTER SUBSCRIPTION
<para>
<para>
If the subscription has several publications in which the same table has
If the subscription has several publications in which the same table has
been published with different row filters (for the same
been published with different row filters (for the same
<link linkend="sql-createpublication-with-publish"><literal>publish</literal></link>
<link linkend="sql-createpublication-params- with-publish"><literal>publish</literal></link>
operation), those expressions get ORed together, so that rows satisfying
operation), those expressions get ORed together, so that rows satisfying
<emphasis>any</emphasis> of the expressions will be replicated. This means all
<emphasis>any</emphasis> of the expressions will be replicated. This means all
the other row filters for the same table become redundant if:
the other row filters for the same table become redundant if:
@ -871,14 +871,14 @@ ALTER SUBSCRIPTION
<listitem>
<listitem>
<para>
<para>
One of the publications was created using
One of the publications was created using
<link linkend="sql-createpublication-for-all-tables"><literal>FOR ALL TABLES</literal></link>.
<link linkend="sql-createpublication-params- for-all-tables"><literal>FOR ALL TABLES</literal></link>.
This clause does not allow row filters.
This clause does not allow row filters.
</para>
</para>
</listitem>
</listitem>
<listitem>
<listitem>
<para>
<para>
One of the publications was created using
One of the publications was created using
<link linkend="sql-createpublication-for-tables-in-schema"><literal>FOR TABLES IN SCHEMA</literal></link>
<link linkend="sql-createpublication-params- for-tables-in-schema"><literal>FOR TABLES IN SCHEMA</literal></link>
and the table belongs to the referred schema. This clause does not allow
and the table belongs to the referred schema. This clause does not allow
row filters.
row filters.
</para>
</para>
@ -1145,7 +1145,7 @@ test_sub=# SELECT * FROM t1;
<para>
<para>
The following examples show how the publication parameter
The following examples show how the publication parameter
<link linkend="sql-createpublication-with-publish-via-partition-root"><literal>publish_via_partition_root</literal></link>
<link linkend="sql-createpublication-params- with-publish-via-partition-root"><literal>publish_via_partition_root</literal></link>
determines whether the row filter of the parent or child table will be used
determines whether the row filter of the parent or child table will be used
in the case of partitioned tables.
in the case of partitioned tables.
</para>
</para>
@ -1300,13 +1300,13 @@ test_sub=# SELECT * FROM child ORDER BY a;
<para>
<para>
Specifying a column list when the publication also publishes
Specifying a column list when the publication also publishes
<link linkend="sql-createpublication-for-tables-in-schema"><literal>FOR TABLES IN SCHEMA</literal></link>
<link linkend="sql-createpublication-params- for-tables-in-schema"><literal>FOR TABLES IN SCHEMA</literal></link>
is not supported.
is not supported.
</para>
</para>
<para>
<para>
For partitioned tables, the publication parameter
For partitioned tables, the publication parameter
<link linkend="sql-createpublication-with-publish-via-partition-root"><literal>publish_via_partition_root</literal></link>
<link linkend="sql-createpublication-params- with-publish-via-partition-root"><literal>publish_via_partition_root</literal></link>
determines which column list is used. If <literal>publish_via_partition_root</literal>
determines which column list is used. If <literal>publish_via_partition_root</literal>
is <literal>true</literal>, the root partitioned table's column list is
is <literal>true</literal>, the root partitioned table's column list is
used. Otherwise, if <literal>publish_via_partition_root</literal> is
used. Otherwise, if <literal>publish_via_partition_root</literal> is
@ -1518,7 +1518,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
either by <link linkend="sql-altersubscription-params-disable">
either by <link linkend="sql-altersubscription-params-disable">
<command>ALTER SUBSCRIPTION ... DISABLE</command></link> or, the
<command>ALTER SUBSCRIPTION ... DISABLE</command></link> or, the
subscription can be used with the
subscription can be used with the
<link linkend="sql-createsubscription-with-disable-on-error"><literal>disable_on_error</literal></link>
<link linkend="sql-createsubscription-params- with-disable-on-error"><literal>disable_on_error</literal></link>
option. Then, you can use <function>pg_replication_origin_advance()</function>
option. Then, you can use <function>pg_replication_origin_advance()</function>
function with the <parameter>node_name</parameter> (i.e., <literal>pg_16395</literal>)
function with the <parameter>node_name</parameter> (i.e., <literal>pg_16395</literal>)
and the next LSN of the finish LSN (i.e., 0/14C0379). The current position of
and the next LSN of the finish LSN (i.e., 0/14C0379). The current position of
@ -1531,7 +1531,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
<para>
<para>
When the
When the
<link linkend="sql-createsubscription-with-streaming"><literal>streaming</literal></link>
<link linkend="sql-createsubscription-params- with-streaming"><literal>streaming</literal></link>
mode is <literal>parallel</literal>, the finish LSN of failed transactions
mode is <literal>parallel</literal>, the finish LSN of failed transactions
may not be logged. In that case, it may be necessary to change the streaming
may not be logged. In that case, it may be necessary to change the streaming
mode to <literal>on</literal> or <literal>off</literal> and cause the same
mode to <literal>on</literal> or <literal>off</literal> and cause the same
@ -1624,7 +1624,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
using the identity and schema of the partitioned root table instead of
using the identity and schema of the partitioned root table instead of
that of the individual leaf partitions in which the changes actually
that of the individual leaf partitions in which the changes actually
originate (see
originate (see
<link linkend="sql-createpublication-with-publish-via-partition-root"><literal>publish_via_partition_root</literal></link>
<link linkend="sql-createpublication-params- with-publish-via-partition-root"><literal>publish_via_partition_root</literal></link>
parameter of <command>CREATE PUBLICATION</command>).
parameter of <command>CREATE PUBLICATION</command>).
</para>
</para>
</listitem>
</listitem>
@ -1709,7 +1709,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
<note>
<note>
<para>
<para>
The publication
The publication
<link linkend="sql-createpublication-with-publish"><literal>publish</literal></link>
<link linkend="sql-createpublication-params- with-publish"><literal>publish</literal></link>
parameter only affects what DML operations will be replicated. The
parameter only affects what DML operations will be replicated. The
initial data synchronization does not take this parameter into account
initial data synchronization does not take this parameter into account
when copying the existing table data.
when copying the existing table data.
@ -1743,7 +1743,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
zero rows in this view. If the initial data synchronization of any
zero rows in this view. If the initial data synchronization of any
table is in progress, there will be additional workers for the tables
table is in progress, there will be additional workers for the tables
being synchronized. Moreover, if the
being synchronized. Moreover, if the
<link linkend="sql-createsubscription-with-streaming"><literal>streaming</literal></link>
<link linkend="sql-createsubscription-params- with-streaming"><literal>streaming</literal></link>
transaction is applied in parallel, there may be additional parallel apply
transaction is applied in parallel, there may be additional parallel apply
workers.
workers.
</para>
</para>