Re: DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Arseny Sher <a(dot)sher(at)postgrespro(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: DROP SUBSCRIPTION hangs if sub is disabled in the same transaction
Date: 2017-09-14 12:23:39
Message-ID: 20170914122339.gboxwprodgqtaiu3@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:
> On 9/13/17 09:56, Alvaro Herrera wrote:
> > Tom Lane wrote:
> >> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> >
> >>> - Disallow DROP SUBSCRIPTION in a transaction under certain
> >>> circumstances, for example if a transaction has previously manipulated
> >>> the same subscription.
> >
> >> ISTM the second of those (refuse to drop an in-use subscription) is
> >> by far the least surprising behavior.
> >
> > +1 for that option. IIRC this has precedent for other object types such
> > as tables, where we refuse some action if we have already operated on
> > the table in the same transaction.
>
> What are some examples of such behavior?

Search for CheckTableNotInUse() callers.

/me hates that the error messages are split across lines

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2017-09-14 12:23:51 Re: Log LDAP "diagnostic messages"?
Previous Message Ashutosh Bapat 2017-09-14 12:06:58 Re: Partition-wise join for join between (declaratively) partitioned tables