@@ -367,7 +367,8 @@ INSERT 0 3
367367
368368 <para>
369369 Create publications for the tables. The publications <literal>pub2</literal>
370- and <literal>pub3a</literal> disallow some <literal>publish</literal>
370+ and <literal>pub3a</literal> disallow some
371+ <link linkend="sql-createpublication-with-publish"><literal>publish</literal></link>
371372 operations. The publication <literal>pub3b</literal> has a row filter (see
372373 <xref linkend="logical-replication-row-filter"/>).
373374<programlisting>
@@ -801,11 +802,12 @@ ALTER SUBSCRIPTION
801802
802803 <para>
803804 If the publication contains a partitioned table, the publication parameter
804- <literal>publish_via_partition_root</literal> determines which row filter
805- is used. If <literal>publish_via_partition_root</literal> is <literal>true</literal>,
806- the <emphasis>root partitioned table's</emphasis> row filter is used. Otherwise,
807- if <literal>publish_via_partition_root</literal> is <literal>false</literal>
808- (default), each <emphasis>partition's</emphasis> row filter is used.
805+ <link linkend="sql-createpublication-with-publish-via-partition-root"><literal>publish_via_partition_root</literal></link>
806+ determines which row filter is used. If <literal>publish_via_partition_root</literal>
807+ is <literal>true</literal>, the <emphasis>root partitioned table's</emphasis>
808+ row filter is used. Otherwise, if <literal>publish_via_partition_root</literal>
809+ is <literal>false</literal> (default), each <emphasis>partition's</emphasis>
810+ row filter is used.
809811 </para>
810812
811813 </sect2>
@@ -829,8 +831,9 @@ ALTER SUBSCRIPTION
829831 <warning>
830832 <para>
831833 Because initial data synchronization does not take into account the
832- <literal>publish</literal> parameter when copying existing table data,
833- some rows may be copied that would not be replicated using DML. Refer to
834+ <link linkend="sql-createpublication-with-publish"><literal>publish</literal></link>
835+ parameter when copying existing table data, some rows may be copied that
836+ would not be replicated using DML. Refer to
834837 <xref linkend="logical-replication-snapshot"/>, and see
835838 <xref linkend="logical-replication-subscription-examples"/> for examples.
836839 </para>
@@ -851,7 +854,8 @@ ALTER SUBSCRIPTION
851854
852855 <para>
853856 If the subscription has several publications in which the same table has
854- been published with different row filters (for the same <literal>publish</literal>
857+ been published with different row filters (for the same
858+ <link linkend="sql-createpublication-with-publish"><literal>publish</literal></link>
855859 operation), those expressions get ORed together, so that rows satisfying
856860 <emphasis>any</emphasis> of the expressions will be replicated. This means all
857861 the other row filters for the same table become redundant if:
@@ -863,15 +867,17 @@ ALTER SUBSCRIPTION
863867 </listitem>
864868 <listitem>
865869 <para>
866- One of the publications was created using <literal>FOR ALL TABLES</literal>.
870+ One of the publications was created using
871+ <link linkend="sql-createpublication-for-all-tables"><literal>FOR ALL TABLES</literal></link>.
867872 This clause does not allow row filters.
868873 </para>
869874 </listitem>
870875 <listitem>
871876 <para>
872877 One of the publications was created using
873- <literal>FOR TABLES IN SCHEMA</literal> and the table belongs to
874- the referred schema. This clause does not allow row filters.
878+ <link linkend="sql-createpublication-for-tables-in-schema"><literal>FOR TABLES IN SCHEMA</literal></link>
879+ and the table belongs to the referred schema. This clause does not allow
880+ row filters.
875881 </para>
876882 </listitem>
877883 </itemizedlist></para>
@@ -1136,9 +1142,9 @@ test_sub=# SELECT * FROM t1;
11361142
11371143 <para>
11381144 The following examples show how the publication parameter
1139- <literal>publish_via_partition_root</literal> determines whether the row
1140- filter of the parent or child table will be used in the case of partitioned
1141- tables.
1145+ <link linkend="sql-createpublication-with-publish-via-partition-root">< literal>publish_via_partition_root</literal></link>
1146+ determines whether the row filter of the parent or child table will be used
1147+ in the case of partitioned tables.
11421148 </para>
11431149
11441150 <para>
@@ -1291,15 +1297,16 @@ test_sub=# SELECT * FROM child ORDER BY a;
12911297
12921298 <para>
12931299 Specifying a column list when the publication also publishes
1294- <literal>FOR TABLES IN SCHEMA</literal> is not supported.
1300+ <link linkend="sql-createpublication-for-tables-in-schema"><literal>FOR TABLES IN SCHEMA</literal></link>
1301+ is not supported.
12951302 </para>
12961303
12971304 <para>
12981305 For partitioned tables, the publication parameter
1299- <literal>publish_via_partition_root</literal> determines which column list
1300- is used. If <literal>publish_via_partition_root</literal> is
1301- <literal>true</literal>, the root partitioned table's column list is used.
1302- Otherwise, if <literal>publish_via_partition_root</literal> is
1306+ <link linkend="sql-createpublication-with-publish-via-partition-root">< literal>publish_via_partition_root</literal></link>
1307+ determines which column list is used. If <literal>publish_via_partition_root</literal>
1308+ is <literal>true</literal>, the root partitioned table's column list is
1309+ used. Otherwise, if <literal>publish_via_partition_root</literal> is
13031310 <literal>false</literal> (the default), each partition's column list is used.
13041311 </para>
13051312
@@ -1610,7 +1617,9 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
16101617 tables.) Publications can also specify that changes are to be replicated
16111618 using the identity and schema of the partitioned root table instead of
16121619 that of the individual leaf partitions in which the changes actually
1613- originate (see <link linkend="sql-createpublication"><command>CREATE PUBLICATION</command></link>).
1620+ originate (see
1621+ <link linkend="sql-createpublication-with-publish-via-partition-root"><literal>publish_via_partition_root</literal></link>
1622+ parameter of <command>CREATE PUBLICATION</command>).
16141623 </para>
16151624 </listitem>
16161625 </itemizedlist>
@@ -1676,9 +1685,11 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
16761685 </para>
16771686 <note>
16781687 <para>
1679- The publication <literal>publish</literal> parameter only affects what
1680- DML operations will be replicated. The initial data synchronization does
1681- not take this parameter into account when copying the existing table data.
1688+ The publication
1689+ <link linkend="sql-createpublication-with-publish"><literal>publish</literal></link>
1690+ parameter only affects what DML operations will be replicated. The
1691+ initial data synchronization does not take this parameter into account
1692+ when copying the existing table data.
16821693 </para>
16831694 </note>
16841695 </sect2>
@@ -1724,10 +1735,11 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
17241735 and <literal>TRIGGER</literal> privilege on such tables to trusted roles.
17251736 Moreover, if untrusted users can create tables, use only
17261737 publications that list tables explicitly. That is to say, create a
1727- subscription <literal>FOR ALL TABLES</literal> or
1728- <literal>FOR TABLES IN SCHEMA</literal> only when superusers trust
1729- every user permitted to create a non-temp table on the publisher or the
1730- subscriber.
1738+ subscription
1739+ <link linkend="sql-createpublication-for-all-tables"><literal>FOR ALL TABLES</literal></link>
1740+ or <link linkend="sql-createpublication-for-tables-in-schema"><literal>FOR TABLES IN SCHEMA</literal></link>
1741+ only when superusers trust every user permitted to create a non-temp table
1742+ on the publisher or the subscriber.
17311743 </para>
17321744
17331745 <para>
0 commit comments