Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the sametransaction - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the sametransaction
Date
Msg-id b4c42958-e67f-fb12-28b1-2da55f3ef97d@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction  (Arseny Sher <a.sher@postgrespro.ru>)
Responses Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction
Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the sametransaction
List pgsql-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

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] taking stdbool.h into use
Next
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] psql: new help related to variables are not too readable