1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

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
This commit is contained in:
Peter Eisentraut
2017-05-09 10:20:42 -04:00
parent c4c493fd35
commit 013c1178fd
20 changed files with 198 additions and 128 deletions

View File

@ -4537,8 +4537,8 @@ _copyDropSubscriptionStmt(const DropSubscriptionStmt *from)
DropSubscriptionStmt *newnode = makeNode(DropSubscriptionStmt);
COPY_STRING_FIELD(subname);
COPY_SCALAR_FIELD(drop_slot);
COPY_SCALAR_FIELD(missing_ok);
COPY_SCALAR_FIELD(behavior);
return newnode;
}