diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2017-05-09 10:20:42 -0400 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2017-05-09 10:20:42 -0400 |
| commit | 013c1178fd0adefa0f68d5ce2d84e7ae6f9613a1 (patch) | |
| tree | c1d81aeda68bec07b67c317617b40cbc8ea2e925 /doc/src | |
| parent | c4c493fd3581dfbce45e903b87e12eea508f47e4 (diff) | |
Remove the NODROP SLOT option from DROP SUBSCRIPTION
It turned out this approach had problems, because a DROP command should
not have any options other than CASCADE and RESTRICT. Instead, always
attempt to drop the slot if there is one configured, but also add an
ALTER SUBSCRIPTION action to set the slot to NONE.
Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/29431.1493730652@sss.pgh.pa.us
Diffstat (limited to 'doc/src')
| -rw-r--r-- | doc/src/sgml/ref/create_subscription.sgml | 9 | ||||
| -rw-r--r-- | doc/src/sgml/ref/drop_subscription.sgml | 23 |
2 files changed, 18 insertions, 14 deletions
diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml index 3c51012df8b..63824684031 100644 --- a/doc/src/sgml/ref/create_subscription.sgml +++ b/doc/src/sgml/ref/create_subscription.sgml @@ -133,6 +133,15 @@ CREATE SUBSCRIPTION <replaceable class="PARAMETER">subscription_name</replaceabl Name of the replication slot to use. The default behavior is to use <literal>subscription_name</> for slot name. </para> + + <para> + When <literal>SLOT NAME</literal> is set to + <literal>NONE</literal>, there will be no replication slot associated + with the subscription. This can be used if the replication slot will be + created later manually. Such subscriptions must also have both + <literal>ENABLED</literal> and <literal>CREATE SLOT</literal> set + to <literal>false</literal>. + </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/ref/drop_subscription.sgml b/doc/src/sgml/ref/drop_subscription.sgml index f1ac1250577..4f34a35eefe 100644 --- a/doc/src/sgml/ref/drop_subscription.sgml +++ b/doc/src/sgml/ref/drop_subscription.sgml @@ -21,7 +21,7 @@ PostgreSQL documentation <refsynopsisdiv> <synopsis> -DROP SUBSCRIPTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [ DROP SLOT | NODROP SLOT ] +DROP SUBSCRIPTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [ CASCADE | RESTRICT ] </synopsis> </refsynopsisdiv> @@ -39,7 +39,9 @@ DROP SUBSCRIPTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable <para> <command>DROP SUBSCRIPTION</command> cannot be executed inside a - transaction block when <literal>DROP SLOT</literal> is specified. + transaction block if the subscription is associated with a replication + slot. (You can use <command>ALTER SUBSCRIPTION</command> to unset the + slot.) </para> </refsect1> @@ -57,20 +59,13 @@ DROP SUBSCRIPTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable </varlistentry> <varlistentry> - <term><literal>DROP SLOT</literal></term> - <term><literal>NODROP SLOT</literal></term> - <listitem> - <para> - Specifies whether to drop the replication slot on the publisher. The - default is - <literal>DROP SLOT</literal>. - </para> + <term><literal>CASCADE</literal></term> + <term><literal>RESTRICT</literal></term> + <listitem> <para> - If the publisher is not reachable when the subscription is to be - dropped, then it is useful to specify <literal>NODROP SLOT</literal>. - But the replication slot on the publisher will then have to be removed - manually. + These key words do not have any effect, since there are no dependencies + on subscriptions. </para> </listitem> </varlistentry> |
