diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2017-04-14 13:58:46 -0400 | 
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2017-04-14 13:58:46 -0400 | 
| commit | 887227a1cc861d87ca0f175cf8bd1447554090eb (patch) | |
| tree | f0cc0f4315bd0489083742d4f7a3285fa749f2e9 /doc/src/sgml/ref/create_subscription.sgml | |
| parent | 25371a72b95aab43b0a3547ead4d3286c1128351 (diff) | |
Add option to modify sync commit per subscription
This also changes default behaviour of subscription workers to
synchronous_commit = off.
Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Diffstat (limited to 'doc/src/sgml/ref/create_subscription.sgml')
| -rw-r--r-- | doc/src/sgml/ref/create_subscription.sgml | 31 | 
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml index 3410d6fc8c2..3c51012df8b 100644 --- a/doc/src/sgml/ref/create_subscription.sgml +++ b/doc/src/sgml/ref/create_subscription.sgml @@ -32,6 +32,7 @@ CREATE SUBSCRIPTION <replaceable class="PARAMETER">subscription_name</replaceabl      | CREATE SLOT | NOCREATE SLOT      | SLOT NAME = <replaceable class="PARAMETER">slot_name</replaceable>      | COPY DATA | NOCOPY DATA +    | SYNCHRONOUS_COMMIT = <replaceable class="PARAMETER">synchronous_commit</replaceable>      | NOCONNECT  </synopsis>   </refsynopsisdiv> @@ -148,6 +149,36 @@ CREATE SUBSCRIPTION <replaceable class="PARAMETER">subscription_name</replaceabl     </varlistentry>     <varlistentry> +    <term><literal>SYNCHRONOUS_COMMIT = <replaceable class="PARAMETER">synchronous_commit</replaceable></literal></term> +    <listitem> +     <para> +      The value of this parameter overrides the +      <xref linkend="guc-synchronous-commit"> setting.  The default value is +      <literal>off</literal>. +     </para> + +     <para> +      It is safe to use <literal>off</literal> for logical replication: If the +      subscriber loses transactions because of missing synchronization, the +      data will be resent from the publisher. +     </para> + +     <para> +      A different setting might be appropriate when doing synchronous logical +      replication.  The logical replication workers report the positions of +      writes and flushes to the publisher, and when using synchronous +      replication, the publisher will wait for the actual flush.  This means +      that setting <literal>SYNCHRONOUS_COMMIT</literal> for the subscriber +      to <literal>off</literal> when the subscription is used for synchronous +      replication might increase the latency for <command>COMMIT</command> on +      the publisher.  In this scenario, it can be advantageous to set +      <literal>SYNCHRONOUS_COMMIT</literal> to <literal>local</literal> or +      higher. +     </para> +    </listitem> +   </varlistentry> + +   <varlistentry>      <term><literal>NOCONNECT</literal></term>      <listitem>       <para>  | 
