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.jeli...@2ndquadrant.com>
Reported-by: Tom Lane <t...@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/29431.1493730...@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/013c1178fd0adefa0f68d5ce2d84e7ae6f9613a1

Modified Files
--------------
doc/src/sgml/ref/create_subscription.sgml          |   9 ++
doc/src/sgml/ref/drop_subscription.sgml            |  23 ++--
src/backend/catalog/pg_subscription.c              |   9 +-
src/backend/commands/subscriptioncmds.c            | 141 +++++++++++++++------
src/backend/nodes/copyfuncs.c                      |   2 +-
src/backend/nodes/equalfuncs.c                     |   2 +-
src/backend/parser/gram.y                          |  47 +++----
src/backend/replication/logical/worker.c           |  35 ++---
src/bin/psql/tab-complete.c                        |   6 +-
src/include/catalog/catversion.h                   |   2 +-
src/include/catalog/pg_subscription.h              |   2 +-
src/include/nodes/parsenodes.h                     |   2 +-
src/include/parser/kwlist.h                        |   1 -
.../dummy_seclabel/expected/dummy_seclabel.out     |   4 +-
.../modules/dummy_seclabel/sql/dummy_seclabel.sql  |   4 +-
src/test/regress/expected/object_address.out       |   4 +-
src/test/regress/expected/subscription.out         |  14 +-
src/test/regress/sql/object_address.sql            |   4 +-
src/test/regress/sql/subscription.sql              |  13 +-
src/test/subscription/t/001_rep_changes.pl         |   2 +-
20 files changed, 198 insertions(+), 128 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Reply via email to