pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Remove the NODROP SLOT option from DROP SUBSCRIPTION
Date: Tue, 09 May 2017 14:20:53 +0000
Message-ID: <E1d860T-0006nN-TF@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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

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


Message-ID: <E1d860T-0006nN-TF@gemulon.postgresql.org>
Permalink:  ../E1d860T-0006nN-TF@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1d860T-0006nN-TF@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter_e@gmx.net
  Subject: Re: pgsql: Remove the NODROP SLOT option from DROP SUBSCRIPTION
  In-Reply-To: <E1d860T-0006nN-TF@gemulon.postgresql.org>
  References: <E1d860T-0006nN-TF@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox