mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +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:
@@ -1609,7 +1609,8 @@ ProcessUtilitySlow(ParseState *pstate,
|
||||
break;
|
||||
|
||||
case T_CreateSubscriptionStmt:
|
||||
address = CreateSubscription((CreateSubscriptionStmt *) parsetree);
|
||||
address = CreateSubscription((CreateSubscriptionStmt *) parsetree,
|
||||
isTopLevel);
|
||||
break;
|
||||
|
||||
case T_AlterSubscriptionStmt:
|
||||
@@ -1617,7 +1618,7 @@ ProcessUtilitySlow(ParseState *pstate,
|
||||
break;
|
||||
|
||||
case T_DropSubscriptionStmt:
|
||||
DropSubscription((DropSubscriptionStmt *) parsetree);
|
||||
DropSubscription((DropSubscriptionStmt *) parsetree, isTopLevel);
|
||||
/* no commands stashed for DROP */
|
||||
commandCollected = true;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user