mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
Doc: Change optional parameters grouping in Create Subscription.
The subscription parameters are rearranged into two groups: a) those that control what happens during Create Subscription b) those that control the replication behavior This makes the documentation of Create Subscription easier to follow. Author: Peter Smith Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/CAHut+PtPJDSOxtuMGpO2yDrRPKxcYGL4n7HqJP9HernZE=Cj+g@mail.gmail.com
This commit is contained in:
parent
72b76f7616
commit
fee1040fe3
@ -92,17 +92,39 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
|
||||
<term><literal>WITH ( <replaceable class="parameter">subscription_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] )</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This clause specifies optional parameters for a subscription. The
|
||||
following parameters are supported:
|
||||
This clause specifies optional parameters for a subscription.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The following parameters control what happens during subscription creation:
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>copy_data</literal> (<type>boolean</type>)</term>
|
||||
<term><literal>connect</literal> (<type>boolean</type>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies whether the existing data in the publications that are
|
||||
being subscribed to should be copied once the replication starts.
|
||||
The default is <literal>true</literal>.
|
||||
Specifies whether the <command>CREATE SUBSCRIPTION</command>
|
||||
should connect to the publisher at all. Setting this to
|
||||
<literal>false</literal> will change default values of
|
||||
<literal>enabled</literal>, <literal>create_slot</literal> and
|
||||
<literal>copy_data</literal> to <literal>false</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It is not allowed to combine <literal>connect</literal> set to
|
||||
<literal>false</literal> and <literal>enabled</literal>,
|
||||
<literal>create_slot</literal>, or <literal>copy_data</literal>
|
||||
set to <literal>true</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Since no connection is made when this option is set
|
||||
to <literal>false</literal>, the tables are not subscribed, and so
|
||||
after you enable the subscription nothing will be replicated.
|
||||
It is required to run
|
||||
<literal>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</literal> in order
|
||||
for tables to be subscribed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -146,6 +168,57 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The following parameters control the replication behavior:
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>binary</literal> (<type>boolean</type>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies whether the subscription will request the publisher to
|
||||
send the data in binary format (as opposed to text).
|
||||
The default is <literal>false</literal>.
|
||||
Even when this option is enabled, only data types that have
|
||||
binary send and receive functions will be transferred in binary.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When doing cross-version replication, it could happen that the
|
||||
publisher has a binary send function for some data type, but the
|
||||
subscriber lacks a binary receive function for the type. In
|
||||
such a case, data transfer will fail, and
|
||||
the <literal>binary</literal> option cannot be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>copy_data</literal> (<type>boolean</type>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies whether the existing data in the publications that are
|
||||
being subscribed to should be copied once the replication starts.
|
||||
The default is <literal>true</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>streaming</literal> (<type>boolean</type>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies whether streaming of in-progress transactions should
|
||||
be enabled for this subscription. By default, all transactions
|
||||
are fully decoded on the publisher, and only then sent to the
|
||||
subscriber as a whole.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>synchronous_commit</literal> (<type>enum</type>)</term>
|
||||
@ -179,67 +252,6 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>binary</literal> (<type>boolean</type>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies whether the subscription will request the publisher to
|
||||
send the data in binary format (as opposed to text).
|
||||
The default is <literal>false</literal>.
|
||||
Even when this option is enabled, only data types that have
|
||||
binary send and receive functions will be transferred in binary.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When doing cross-version replication, it could happen that the
|
||||
publisher has a binary send function for some data type, but the
|
||||
subscriber lacks a binary receive function for the type. In
|
||||
such a case, data transfer will fail, and
|
||||
the <literal>binary</literal> option cannot be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><literal>connect</literal> (<type>boolean</type>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies whether the <command>CREATE SUBSCRIPTION</command>
|
||||
should connect to the publisher at all. Setting this to
|
||||
<literal>false</literal> will change default values of
|
||||
<literal>enabled</literal>, <literal>create_slot</literal> and
|
||||
<literal>copy_data</literal> to <literal>false</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It is not allowed to combine <literal>connect</literal> set to
|
||||
<literal>false</literal> and <literal>enabled</literal>,
|
||||
<literal>create_slot</literal>, or <literal>copy_data</literal>
|
||||
set to <literal>true</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Since no connection is made when this option is set
|
||||
to <literal>false</literal>, the tables are not subscribed, and so
|
||||
after you enable the subscription nothing will be replicated.
|
||||
It is required to run
|
||||
<literal>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</literal> in order
|
||||
for tables to be subscribed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>streaming</literal> (<type>boolean</type>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies whether streaming of in-progress transactions should
|
||||
be enabled for this subscription. By default, all transactions
|
||||
are fully decoded on the publisher, and only then sent to the
|
||||
subscriber as a whole.
|
||||
</para>
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>two_phase</literal> (<type>boolean</type>)</term>
|
||||
<listitem>
|
||||
@ -266,7 +278,9 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist></para>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
Loading…
x
Reference in New Issue
Block a user