pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: logical replication syntax (was DROP SUBSCRIPTION, query cancellations and slot handling)
Date: Tue, 02 May 2017 09:31:44 -0400
Message-ID: <30166.1493731904@sss.pgh.pa.us> (raw)
In-Reply-To: <9174dc31-787a-a2f6-818f-cb4a5c1dfddb@2ndquadrant.com>
References: <CA+TgmoZmkbpAWRzVKDVcHnTBkYjJEFS8=09RL-G3zgdozCLFHQ@mail.gmail.com>
	<27478.1493727233@sss.pgh.pa.us>
	<29431.1493730652@sss.pgh.pa.us>
	<360a1932-7af4-609b-94f1-2ad419430869@2ndquadrant.com>
	<9174dc31-787a-a2f6-818f-cb4a5c1dfddb@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Petr Jelinek <petr.jelinek@2ndquadrant.com> writes:
> Let me expand, if we don't drop the slot by default when dropping
> subscription, we'll have a lot of users with dead slots laying around
> holding back WAL/catalog_xmin, that's really bad. If we do drop by
> default like now, we need option to not do that, neither RESTRICT, nor
> CASCADE fit that.

I'm not sure which part of "you can't have an option in DROP" isn't
clear to you.  Whatever the default behavior is always has to work,
because that is what's going to happen during DROP OWNED BY, or
DROP DATABASE.  If you want more than one behavior during DROP,
you need to drive that off something represented as a persistent
property of the object, not off an option in the DROP command.

I agree that RESTRICT/CASCADE don't fit this, unless the model
is that the slot is always owned by the subscription, which might
be too restrictive.

			regards, tom lane


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



view thread (47+ messages)  latest in thread

Message-ID: <30166.1493731904@sss.pgh.pa.us>
Permalink:  ../30166.1493731904@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/30166.1493731904@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, petr.jelinek@2ndquadrant.com, robertmhaas@gmail.com, michael.paquier@gmail.com
  Subject: Re: logical replication syntax (was DROP SUBSCRIPTION, query cancellations and slot handling)
  In-Reply-To: <30166.1493731904@sss.pgh.pa.us>

* 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