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 | |
| 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')
| -rw-r--r-- | doc/src/sgml/catalogs.sgml | 10 | ||||
| -rw-r--r-- | doc/src/sgml/ref/alter_subscription.sgml | 2 | ||||
| -rw-r--r-- | doc/src/sgml/ref/create_subscription.sgml | 31 |
3 files changed, 43 insertions, 0 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 5883673448c..5254bb3025a 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -6531,6 +6531,16 @@ </row> <row> + <entry><structfield>subsynccommit</structfield></entry> + <entry><type>text</type></entry> + <entry></entry> + <entry> + Contains the value of the <varname>synchronous_commit</varname> + setting for the subscription workers. + </entry> + </row> + + <row> <entry><structfield>subconninfo</structfield></entry> <entry><type>text</type></entry> <entry></entry> diff --git a/doc/src/sgml/ref/alter_subscription.sgml b/doc/src/sgml/ref/alter_subscription.sgml index 640fac0a159..f71ee38b40c 100644 --- a/doc/src/sgml/ref/alter_subscription.sgml +++ b/doc/src/sgml/ref/alter_subscription.sgml @@ -26,6 +26,7 @@ ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> WITH ( <rep <phrase>where <replaceable class="PARAMETER">suboption</replaceable> can be:</phrase> SLOT NAME = <replaceable class="PARAMETER">slot_name</replaceable> + | SYNCHRONOUS_COMMIT = <replaceable class="PARAMETER">synchronous_commit</replaceable> ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> SET PUBLICATION <replaceable class="PARAMETER">publication_name</replaceable> [, ...] { REFRESH WITH ( <replaceable class="PARAMETER">puboption</replaceable> [, ... ] ) | NOREFRESH } ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> REFRESH PUBLICATION WITH ( <replaceable class="PARAMETER">puboption</replaceable> [, ... ] ) @@ -91,6 +92,7 @@ ALTER SUBSCRIPTION <replaceable class="PARAMETER">name</replaceable> DISABLE <varlistentry> <term><literal>CONNECTION '<replaceable class="parameter">conninfo</replaceable>'</literal></term> <term><literal>SLOT NAME = <replaceable class="parameter">slot_name</replaceable></literal></term> + <term><literal>SYNCHRONOUS_COMMIT = <replaceable class="PARAMETER">synchronous_commit</replaceable></literal></term> <listitem> <para> These clauses alter properties originally set by 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> |
