From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Petr Jelinek <petr.jelinek@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:15:30 -0300
Message-ID: <20170502211530.knjb72uo2lykuzxt@alvherre.pgsql> (raw)
In-Reply-To: <CA+TgmoZGdsDmqDbRTmpgxb9bQttkQgbyXTwCV1QcVKMHfA1QdQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Robert Haas wrote:
> On Tue, May 2, 2017 at 12:25 PM, Alvaro Herrera
> <alvherre@2ndquadrant.com> wrote:
> > 2) don't drop because we know it won't work. I see two options:
> > c) ignore a drop slot failure, i.e. don't cause a transaction abort.
> > An easy way to implement this is just add a PG_TRY block, but we
> > dislike adding those and not re-throwing the error.
>
> Dislike doesn't seem like the right word. Unless you rollback a
> (sub)transaction, none of the cleanup that would normally do is done,
True. So one possible implementation is that we open a subtransaction
before dropping the slot, and we abort it if things go south. This is a
bit slower, but not critically so.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, 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
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: alvherre@2ndquadrant.com, robertmhaas@gmail.com, petr.jelinek@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: <20170502211530.knjb72uo2lykuzxt@alvherre.pgsql>
* 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