From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Arseny Sher <a.sher@postgrespro.ru>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org, Masahiko Sawada <sawada.mshk@gmail.com>
Subject: Re: DROP SUBSCRIPTION hangs if sub is disabled in the same transaction
Date: Sat, 16 Sep 2017 08:52:46 -0400
Message-ID: <b4c42958-e67f-fb12-28b1-2da55f3ef97d@2ndquadrant.com> (raw)
In-Reply-To: <87mv5v50gt.fsf@ars-thinkpad>
References: <87mv6av84w.fsf@ars-thinkpad>
<48b251c6-0652-c131-975a-835d8cdb003c@2ndquadrant.com>
<10937.1505245906@sss.pgh.pa.us>
<87shfqsw22.fsf@ars-thinkpad>
<c523d4e6-d082-a8b2-e728-7ede1f2fef3a@2ndquadrant.com>
<87o9qd6p13.fsf@ars-thinkpad>
<4a3d7e55-1f57-f501-d5ac-2adff9256878@2ndquadrant.com>
<87mv5v50gt.fsf@ars-thinkpad>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 9/15/17 13:35, Arseny Sher wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>
>> Here is a simple patch that fixes this, based on my original proposal
>> point #4.
>
> I checked, it passes the tests and solves the problem. However, isn't
> this
>
> + if (slotname || !subenabled)
>
> is a truism? Is it possible that subscription has no slot but still
> enabled?
Yeah, we could just remove the _at_commit() branch entirely. That would
effectively undo the change in 7e174fa793a2df89fe03d002a5087ef67abcdde8,
but I don't see any other choice for now. And the practical impact
would be quite limited.
> Besides, we can avoid stopping the workers if subscription has no
> associated replication origin, though this probably means that
> subscription was broken by user and is not worth it.
Right, it seems not worth addressing this case separately.
--
Peter Eisentraut http://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 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-hackers@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, a.sher@postgrespro.ru, tgl@sss.pgh.pa.us, sawada.mshk@gmail.com
Subject: Re: DROP SUBSCRIPTION hangs if sub is disabled in the same transaction
In-Reply-To: <b4c42958-e67f-fb12-28b1-2da55f3ef97d@2ndquadrant.com>
References: <87mv6av84w.fsf@ars-thinkpad> <48b251c6-0652-c131-975a-835d8cdb003c@2ndquadrant.com> <10937.1505245906@sss.pgh.pa.us> <87shfqsw22.fsf@ars-thinkpad> <c523d4e6-d082-a8b2-e728-7ede1f2fef3a@2ndquadrant.com> <87o9qd6p13.fsf@ars-thinkpad> <4a3d7e55-1f57-f501-d5ac-2adff9256878@2ndquadrant.com> <87mv5v50gt.fsf@ars-thinkpad> <b4c42958-e67f-fb12-28b1-2da55f3ef97d@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