mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Disallow CREATE/DROP SUBSCRIPTION in transaction block
Disallow CREATE SUBSCRIPTION and DROP SUBSCRIPTION in a transaction block when the replication slot is to be created or dropped, since that cannot be rolled back. based on patch by Masahiko Sawada <sawada.mshk@gmail.com>
This commit is contained in:
@ -51,6 +51,11 @@ CREATE SUBSCRIPTION <replaceable class="PARAMETER">subscription_name</replaceabl
|
||||
subscription at the commit of the transaction where this command is run.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>CREATE SUBSCRIPTION</command> cannot be executed inside a
|
||||
transaction block when <literal>CREATE SLOT</literal> is specified.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Additional info about subscriptions and logical replication as a whole
|
||||
can is available at <xref linkend="logical-replication-subscription"> and
|
||||
|
@ -38,8 +38,8 @@ DROP SUBSCRIPTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The replication worker associated with the subscription will not stop until
|
||||
after the transaction that issued this command has committed.
|
||||
<command>DROP SUBSCRIPTION</command> cannot be executed inside a
|
||||
transaction block when <literal>DROP SLOT</literal> is specified.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
Reference in New Issue
Block a user