pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Petr Jelinek <petr.jelinek@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
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, 2 May 2017 18:16:27 +0200
Message-ID: <e99cb399-5cba-d007-798c-ba998322a2e4@2ndquadrant.com> (raw)
In-Reply-To: <CA+TgmoYvobB=85_K7JOdECjzzWS1Rnem-vTkp42r_8gFP0gitQ@mail.gmail.com>
References: <e39ca2a7-75b9-398c-eb92-a80a566f151b@2ndquadrant.com>
	<20170502154959.r45gitdimklbcrwt@alvherre.pgsql>
	<CA+TgmoYvobB=85_K7JOdECjzzWS1Rnem-vTkp42r_8gFP0gitQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 02/05/17 18:00, Robert Haas wrote:
> On Tue, May 2, 2017 at 11:49 AM, Alvaro Herrera
> <alvherre@2ndquadrant.com> wrote:
>> Petr Jelinek wrote:
>>> So the only way to fulfill the requirement you stated is to just not try
>>> to drop the slot, ever, on DROP SUBSCRIPTION. That makes the default
>>> behavior leave resources on upstream that will eventually cause that
>>> server to stop unless user notices before. I think we better invent
>>> something that limits how much inactive slots can hold back WAL and
>>> catalog_xmin in this release as well then.
>>
>> I don't understand why isn't the default behavior to unconditionally
>> drop the slot.  Why do we ever want the slot to be kept?
> 
> What if the remote server doesn't exist any more?
> 

Or what if the slot is used by other subscription (because you restored
dump containing subscriptions to another server for example), or you
have server that does not have outside network access anymore, or many
other reasons.

-- 
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services


-- 
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: <e99cb399-5cba-d007-798c-ba998322a2e4@2ndquadrant.com>
Permalink:  ../e99cb399-5cba-d007-798c-ba998322a2e4@2ndquadrant.com/
Also on:    postgresql.org/message-id/e99cb399-5cba-d007-798c-ba998322a2e4@2ndquadrant.com

 · 

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: petr.jelinek@2ndquadrant.com, robertmhaas@gmail.com, alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, michael.paquier@gmail.com
  Subject: Re: logical replication syntax (was DROP SUBSCRIPTION, query cancellations and slot handling)
  In-Reply-To: <e99cb399-5cba-d007-798c-ba998322a2e4@2ndquadrant.com>

* 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