Add XML ID attributes to create_subscription.sgml.

Commit ecb696527c added an XML ID attribute to one varlistentry in
create_subscription.sgml. Following 78ee60ed84, this commit adds XML ID
attributes to all varlistentries in create_subscription.sgml.
Additionally, links are added to refer to the subscription options,
enhancing the readability of documents.

Author: Kuroda Hayato
Reviewed-by: Peter Smith, Amit Kapila
Discussion: https://postgr.es/m/TYAPR01MB58667AE04D291924671E2051F5879@TYAPR01MB5866.jpnprd01.prod.outlook.com
This commit is contained in:
Amit Kapila 2023-03-29 09:58:14 +05:30
parent 00d9dcf5be
commit de5a47af2d
5 changed files with 67 additions and 52 deletions

View File

@ -11768,8 +11768,9 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
On the publisher side, <varname>logical_replication_mode</varname> On the publisher side, <varname>logical_replication_mode</varname>
allows streaming or serializing changes immediately in logical decoding. allows streaming or serializing changes immediately in logical decoding.
When set to <literal>immediate</literal>, stream each change if the When set to <literal>immediate</literal>, stream each change if the
<literal>streaming</literal> option (see optional parameters set by <link linkend="sql-createsubscription-with-streaming"><literal>streaming</literal></link>
<link linkend="sql-createsubscription"><command>CREATE SUBSCRIPTION</command></link>) option of
<link linkend="sql-createsubscription"><command>CREATE SUBSCRIPTION</command></link>
is enabled, otherwise, serialize each change. When set to is enabled, otherwise, serialize each change. When set to
<literal>buffered</literal>, the decoding will stream or serialize <literal>buffered</literal>, the decoding will stream or serialize
changes when <varname>logical_decoding_work_mem</varname> is reached. changes when <varname>logical_decoding_work_mem</varname> is reached.

View File

@ -252,8 +252,9 @@
additional columns not provided by the published table. Any such columns additional columns not provided by the published table. Any such columns
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 <link linkend="sql-createsubscription-binary"><literal>binary</literal> restrictive. See the
option</link> of <command>CREATE SUBSCRIPTION</command> for details. <link linkend="sql-createsubscription-with-binary"><literal>binary</literal></link>
option of <command>CREATE SUBSCRIPTION</command> for details.
</para> </para>
<sect2 id="logical-replication-subscription-slot"> <sect2 id="logical-replication-subscription-slot">
@ -587,7 +588,9 @@ 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 <literal>slot_name</literal> but also specifies the
<link linkend="sql-createsubscription-with-slot-name"><literal>slot_name</literal></link>
option.
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para> <para>
@ -704,9 +707,10 @@ ALTER SUBSCRIPTION
If the row filter evaluates to <literal>false</literal> or <literal>NULL</literal> If the row filter evaluates to <literal>false</literal> or <literal>NULL</literal>
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 <literal>CONNECTION</literal> clause of the the role specified in the
<xref linkend="sql-createsubscription"/>). Row filters have no effect for <link linkend="sql-createsubscription-connection"><literal>CONNECTION</literal></link>
<command>TRUNCATE</command> command. clause of the <xref linkend="sql-createsubscription"/>). Row filters have
no effect for <command>TRUNCATE</command> command.
</para> </para>
</sect2> </sect2>
@ -1500,9 +1504,10 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
<function>pg_replication_origin_advance()</function></link> function. <function>pg_replication_origin_advance()</function></link> function.
Before using this function, the subscription needs to be disabled temporarily Before using this function, the subscription needs to be disabled temporarily
either by <command>ALTER SUBSCRIPTION ... DISABLE</command> or, the either by <command>ALTER SUBSCRIPTION ... DISABLE</command> or, the
subscription can be used with the <literal>disable_on_error</literal> option. subscription can be used with the
Then, you can use <function>pg_replication_origin_advance()</function> function <link linkend="sql-createsubscription-with-disable-on-error"><literal>disable_on_error</literal></link>
with the <parameter>node_name</parameter> (i.e., <literal>pg_16395</literal>) option. Then, you can use <function>pg_replication_origin_advance()</function>
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
origins can be seen in the <link linkend="view-pg-replication-origin-status"> origins can be seen in the <link linkend="view-pg-replication-origin-status">
<structname>pg_replication_origin_status</structname></link> system view. <structname>pg_replication_origin_status</structname></link> system view.
@ -1512,11 +1517,13 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
</para> </para>
<para> <para>
When the streaming mode is <literal>parallel</literal>, the finish LSN of When the
failed transactions may not be logged. In that case, it may be necessary to <link linkend="sql-createsubscription-with-streaming"><literal>streaming</literal></link>
change the streaming mode to <literal>on</literal> or <literal>off</literal> and mode is <literal>parallel</literal>, the finish LSN of failed transactions
cause the same conflicts again so the finish LSN of the failed transaction will may not be logged. In that case, it may be necessary to change the streaming
be written to the server log. For the usage of finish LSN, please refer to <link mode to <literal>on</literal> or <literal>off</literal> and cause the same
conflicts again so the finish LSN of the failed transaction will be written
to the server log. For the usage of finish LSN, please refer to <link
linkend="sql-altersubscription"><command>ALTER SUBSCRIPTION ... linkend="sql-altersubscription"><command>ALTER SUBSCRIPTION ...
SKIP</command></link>. SKIP</command></link>.
</para> </para>
@ -1701,8 +1708,10 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER
subscription. A disabled subscription or a crashed subscription will have subscription. A disabled subscription or a crashed subscription will have
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 streaming transaction is applied in being synchronized. Moreover, if the
parallel, there may be additional parallel apply workers. <link linkend="sql-createsubscription-with-streaming"><literal>streaming</literal></link>
transaction is applied in parallel, there may be additional parallel apply
workers.
</para> </para>
</sect1> </sect1>

View File

@ -71,10 +71,11 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO <
executed inside a transaction block. executed inside a transaction block.
These commands also cannot be executed when the subscription has These commands also cannot be executed when the subscription has
<literal>two_phase</literal> commit enabled, <link linkend="sql-createsubscription-with-two-phase"><literal>two_phase</literal></link>
unless <literal>copy_data</literal> is <literal>false</literal>. commit enabled, unless
See column <structfield>subtwophasestate</structfield> of <link linkend="sql-createsubscription-with-copy-data"><literal>copy_data</literal></link>
<link linkend="catalog-pg-subscription"><structname>pg_subscription</structname></link> is <literal>false</literal>. See column <structfield>subtwophasestate</structfield>
of <link linkend="catalog-pg-subscription"><structname>pg_subscription</structname></link>
to know the actual two-phase state. to know the actual two-phase state.
</para> </para>
</refsect1> </refsect1>
@ -175,12 +176,14 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO <
<para> <para>
See <xref linkend="sql-createsubscription-notes"/> for details of See <xref linkend="sql-createsubscription-notes"/> for details of
how <literal>copy_data = true</literal> can interact with the how <literal>copy_data = true</literal> can interact with the
<literal>origin</literal> parameter. <link linkend="sql-createsubscription-with-origin"><literal>origin</literal></link>
parameter.
</para> </para>
<para> <para>
See the <link linkend="sql-createsubscription-binary"><literal>binary</literal> See the
option</link> of <command>CREATE SUBSCRIPTION</command> for details <link linkend="sql-createsubscription-with-binary"><literal>binary</literal></link>
about copying pre-existing data in binary format. parameter of <command>CREATE SUBSCRIPTION</command> for details about
copying pre-existing data in binary format.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -214,12 +217,13 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO <
<para> <para>
This clause alters parameters originally set by This clause alters parameters originally set by
<xref linkend="sql-createsubscription"/>. See there for more <xref linkend="sql-createsubscription"/>. See there for more
information. The parameters that can be altered information. The parameters that can be altered are
are <literal>slot_name</literal>, <link linkend="sql-createsubscription-with-slot-name"><literal>slot_name</literal></link>,
<literal>synchronous_commit</literal>, <link linkend="sql-createsubscription-with-synchronous-commit"><literal>synchronous_commit</literal></link>,
<literal>binary</literal>, <literal>streaming</literal>, <link linkend="sql-createsubscription-with-binary"><literal>binary</literal></link>,
<literal>disable_on_error</literal>, and <link linkend="sql-createsubscription-with-streaming"><literal>streaming</literal></link>,
<literal>origin</literal>. <link linkend="sql-createsubscription-with-disable-on-error"><literal>disable_on_error</literal></link>,
and <link linkend="sql-createsubscription-with-origin"><literal>origin</literal></link>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -233,8 +237,9 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO <
resolved. By using the <command>ALTER SUBSCRIPTION ... SKIP</command> command, resolved. By using the <command>ALTER SUBSCRIPTION ... SKIP</command> command,
the logical replication worker skips all data modification changes within the logical replication worker skips all data modification changes within
the transaction. This option has no effect on the transactions that are the transaction. This option has no effect on the transactions that are
already prepared by enabling <literal>two_phase</literal> on already prepared by enabling
subscriber. <link linkend="sql-createsubscription-with-two-phase"><literal>two_phase</literal></link>
on the subscriber.
After the logical replication worker successfully skips the transaction or After the logical replication worker successfully skips the transaction or
finishes a transaction, the LSN (stored in finishes a transaction, the LSN (stored in
<structname>pg_subscription</structname>.<structfield>subskiplsn</structfield>) <structname>pg_subscription</structname>.<structfield>subskiplsn</structfield>)

View File

@ -61,7 +61,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
<title>Parameters</title> <title>Parameters</title>
<variablelist> <variablelist>
<varlistentry> <varlistentry id="sql-createsubscription-name">
<term><replaceable class="parameter">subscription_name</replaceable></term> <term><replaceable class="parameter">subscription_name</replaceable></term>
<listitem> <listitem>
<para> <para>
@ -70,7 +70,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry id="sql-createsubscription-connection">
<term><literal>CONNECTION '<replaceable class="parameter">conninfo</replaceable>'</literal></term> <term><literal>CONNECTION '<replaceable class="parameter">conninfo</replaceable>'</literal></term>
<listitem> <listitem>
<para> <para>
@ -81,7 +81,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry id="sql-createsubscription-publication">
<term><literal>PUBLICATION <replaceable class="parameter">publication_name</replaceable> [, ...]</literal></term> <term><literal>PUBLICATION <replaceable class="parameter">publication_name</replaceable> [, ...]</literal></term>
<listitem> <listitem>
<para> <para>
@ -90,7 +90,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry id="sql-createsubscription-with">
<term><literal>WITH ( <replaceable class="parameter">subscription_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] )</literal></term> <term><literal>WITH ( <replaceable class="parameter">subscription_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] )</literal></term>
<listitem> <listitem>
<para> <para>
@ -102,7 +102,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
<variablelist> <variablelist>
<varlistentry> <varlistentry id="sql-createsubscription-with-connect">
<term><literal>connect</literal> (<type>boolean</type>)</term> <term><literal>connect</literal> (<type>boolean</type>)</term>
<listitem> <listitem>
<para> <para>
@ -129,7 +129,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry id="sql-createsubscription-with-create-slot">
<term><literal>create_slot</literal> (<type>boolean</type>)</term> <term><literal>create_slot</literal> (<type>boolean</type>)</term>
<listitem> <listitem>
<para> <para>
@ -145,7 +145,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry id="sql-createsubscription-with-enabled">
<term><literal>enabled</literal> (<type>boolean</type>)</term> <term><literal>enabled</literal> (<type>boolean</type>)</term>
<listitem> <listitem>
<para> <para>
@ -156,7 +156,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry id="sql-createsubscription-with-slot-name">
<term><literal>slot_name</literal> (<type>string</type>)</term> <term><literal>slot_name</literal> (<type>string</type>)</term>
<listitem> <listitem>
<para> <para>
@ -185,7 +185,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
<variablelist> <variablelist>
<varlistentry id="sql-createsubscription-binary" xreflabel="binary"> <varlistentry id="sql-createsubscription-with-binary">
<term><literal>binary</literal> (<type>boolean</type>)</term> <term><literal>binary</literal> (<type>boolean</type>)</term>
<listitem> <listitem>
<para> <para>
@ -222,7 +222,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry id="sql-createsubscription-with-copy-data">
<term><literal>copy_data</literal> (<type>boolean</type>)</term> <term><literal>copy_data</literal> (<type>boolean</type>)</term>
<listitem> <listitem>
<para> <para>
@ -243,7 +243,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry id="sql-createsubscription-with-streaming">
<term><literal>streaming</literal> (<type>enum</type>)</term> <term><literal>streaming</literal> (<type>enum</type>)</term>
<listitem> <listitem>
<para> <para>
@ -271,7 +271,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry id="sql-createsubscription-with-synchronous-commit">
<term><literal>synchronous_commit</literal> (<type>enum</type>)</term> <term><literal>synchronous_commit</literal> (<type>enum</type>)</term>
<listitem> <listitem>
<para> <para>
@ -303,7 +303,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry id="sql-createsubscription-with-two-phase">
<term><literal>two_phase</literal> (<type>boolean</type>)</term> <term><literal>two_phase</literal> (<type>boolean</type>)</term>
<listitem> <listitem>
<para> <para>
@ -334,7 +334,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry id="sql-createsubscription-with-disable-on-error">
<term><literal>disable_on_error</literal> (<type>boolean</type>)</term> <term><literal>disable_on_error</literal> (<type>boolean</type>)</term>
<listitem> <listitem>
<para> <para>
@ -346,7 +346,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry id="sql-createsubscription-with-origin">
<term><literal>origin</literal> (<type>string</type>)</term> <term><literal>origin</literal> (<type>string</type>)</term>
<listitem> <listitem>
<para> <para>

View File

@ -1458,9 +1458,9 @@ CREATE DATABASE foo WITH TEMPLATE template0;
truncate the target tables before initiating a new full table copy. If users truncate the target tables before initiating a new full table copy. If users
intend to copy initial data during refresh they must create the slot with intend to copy initial data during refresh they must create the slot with
<literal>two_phase = false</literal>. After the initial sync, the <literal>two_phase = false</literal>. After the initial sync, the
<literal>two_phase</literal> option will be automatically enabled by the <link linkend="sql-createsubscription-with-two-phase"><literal>two_phase</literal></link>
subscriber if the subscription had been originally created with option will be automatically enabled by the subscriber if the subscription
<literal>two_phase = true</literal> option. had been originally created with <literal>two_phase = true</literal> option.
</para> </para>
</refsect1> </refsect1>