pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Arseny Sher <a.sher@postgrespro.ru>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: DROP SUBSCRIPTION hangs if sub is disabled in the same transaction
Date: Fri, 22 Sep 2017 15:06:11 -0400
Message-ID: <aeda27ae-dac6-02dd-9c57-3fe28e49d5e9@2ndquadrant.com> (raw)
In-Reply-To: <CAD21AoDByUZXU0ha10UEmSU_FzYTjeb0323iAq3_ckpV8aOW0A@mail.gmail.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>
	<CAD21AoCbEqLD48N+k5Z+1xB+amh7+Z7G8D-DyOkE7q0n6CYWpw@mail.gmail.com>
	<CAD21AoDByUZXU0ha10UEmSU_FzYTjeb0323iAq3_ckpV8aOW0A@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 9/21/17 04:43, Masahiko Sawada wrote:
>> Once we got this patch, DROP SUBSCRIPTION is not transactional either
>> if dropping a replication slot or if the subscription got disabled in
>> a transaction block. But we disallow to do DROP SUBSCRIPTION in a
>> transaction block only in the former case. In the latter case, we
>> adopted such non-transactional behaviour. Since these behaviours would
>> be complex for users I attached the documentation patch explaining it.
>>
> Hmm, isn't there necessary to care and mention about this kind of
> inconsistent behavior in docs?

I have added documentation that certain forms of CREATE/DROP
SUBSCRIPTION cannot be run inside a transaction block, which we have
done for other such commands.

I don't think we need to go into further detail.  We don't guarantee
continuous connections.  If a worker is stopped and restarted in the
background as an implementation detail, then the user is not impacted.

-- 
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



view thread (32+ messages)  latest in thread

Message-ID: <aeda27ae-dac6-02dd-9c57-3fe28e49d5e9@2ndquadrant.com>
Permalink:  ../aeda27ae-dac6-02dd-9c57-3fe28e49d5e9@2ndquadrant.com/
Also on:    postgresql.org/message-id/aeda27ae-dac6-02dd-9c57-3fe28e49d5e9@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 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, sawada.mshk@gmail.com, a.sher@postgrespro.ru, tgl@sss.pgh.pa.us
  Subject: Re: DROP SUBSCRIPTION hangs if sub is disabled in the same transaction
  In-Reply-To: <aeda27ae-dac6-02dd-9c57-3fe28e49d5e9@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> <CAD21AoCbEqLD48N+k5Z+1xB+amh7+Z7G8D-DyOkE7q0n6CYWpw@mail.gmail.com> <CAD21AoDByUZXU0ha10UEmSU_FzYTjeb0323iAq3_ckpV8aOW0A@mail.gmail.com> <aeda27ae-dac6-02dd-9c57-3fe28e49d5e9@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