pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: fn ln <emuser20140816@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: BUG #15977: Inconsistent behavior in chained transactions
Date: Sat, 7 Sep 2019 15:23:05 +0200 (CEST)
Message-ID: <alpine.DEB.2.21.1909071513210.15836@lancre> (raw)
In-Reply-To: <CA+99BHqSVBpJZ9pD=QczBs5L8KfuAvi3rYkKRbXXNE0cADoB+A@mail.gmail.com>
References: <alpine.DEB.2.21.1908291406200.28828@lancre>
	<CA+99BHrbigiWkM5Sss3fia24t=UdXHgsCLsNjotPsbsCV7ZcHA@mail.gmail.com>
	<alpine.DEB.2.21.1908291440490.28828@lancre>
	<CA+99BHoWDs19t4rLEeifNs4fNp4iHQD=na1TYGn+rpCTWvkMJg@mail.gmail.com>
	<alpine.DEB.2.21.1908291654580.28828@lancre>
	<8655dc29-8d50-162d-deaf-fa0329dfed51@2ndquadrant.com>
	<20190904075305.2gkf5z4r6xwgxcwf@alap3.anarazel.de>
	<CA+99BHonbDf1MRzOteoU+MxdrL1xOzOa7uTsy102vy2i-aGRJw@mail.gmail.com>
	<d2d5e3fc-cfe8-b7ba-d335-107a32c2b095@2ndquadrant.com>
	<20190905211135.q63scps3pvrc3i43@alap3.anarazel.de>
	<20190906075415.GA31979@paquier.xyz>
	<alpine.DEB.2.21.1909070833570.15836@lancre>
	<CA+99BHqSVBpJZ9pD=QczBs5L8KfuAvi3rYkKRbXXNE0cADoB+A@mail.gmail.com>


> I made another patch for that.
> I don't have much confidence with my English spelling so further
> improvements may be needed.
>
>> If it is too much a change and potential regression, then I think that the
>> "and chain" variants should be consistent and just raise warnings.

> We don't have an exact answer for implicit transaction chaining behavior
> yet.

> So I think it's better to disable this feature until someone discovers the
> use cases for this.

> Permitting AND CHAIN without a detailed specification might cause troubles
> in future.

I think that it would be too bad to remove this feature for a small 
implementation-dependent corner case.

Documentation says that COMMIT/ROLLBACK [AND CHAIN] apply to the "current 
transaction", and "BEGIN initiates a transaction block".

If there is no BEGIN, there is no "current transaction", so basically the 
behavior is unspecified, whether AND CHAIN or not, and we are free 
somehow.

In such case, I'm simply arguing for consistency: whatever the behavior, 
the chain and no chain variants should behave the same.

Now, I'd prefer error in all cases, no doubt about that, which might be 
considered a regression. A way around that could be to have a GUC decide 
between a strict behavior (error) and the old behavior (warning).

-- 
Fabien.





view thread (30+ messages)  latest in thread

Message-ID: <alpine.DEB.2.21.1909071513210.15836@lancre>
Permalink:  ../alpine.DEB.2.21.1909071513210.15836@lancre/
Also on:    postgresql.org/message-id/alpine.DEB.2.21.1909071513210.15836@lancre

 · 

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-bugs@postgresql.org
  Cc: coelho@cri.ensmp.fr, emuser20140816@gmail.com, michael@paquier.xyz, andres@anarazel.de, peter.eisentraut@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: BUG #15977: Inconsistent behavior in chained transactions
  In-Reply-To: <alpine.DEB.2.21.1909071513210.15836@lancre>
  References: <alpine.DEB.2.21.1908291406200.28828@lancre> <CA+99BHrbigiWkM5Sss3fia24t=UdXHgsCLsNjotPsbsCV7ZcHA@mail.gmail.com> <alpine.DEB.2.21.1908291440490.28828@lancre> <CA+99BHoWDs19t4rLEeifNs4fNp4iHQD=na1TYGn+rpCTWvkMJg@mail.gmail.com> <alpine.DEB.2.21.1908291654580.28828@lancre> <8655dc29-8d50-162d-deaf-fa0329dfed51@2ndquadrant.com> <20190904075305.2gkf5z4r6xwgxcwf@alap3.anarazel.de> <CA+99BHonbDf1MRzOteoU+MxdrL1xOzOa7uTsy102vy2i-aGRJw@mail.gmail.com> <d2d5e3fc-cfe8-b7ba-d335-107a32c2b095@2ndquadrant.com> <20190905211135.q63scps3pvrc3i43@alap3.anarazel.de> <20190906075415.GA31979@paquier.xyz> <alpine.DEB.2.21.1909070833570.15836@lancre> <CA+99BHqSVBpJZ9pD=QczBs5L8KfuAvi3rYkKRbXXNE0cADoB+A@mail.gmail.com> <alpine.DEB.2.21.1909071513210.15836@lancre>

* 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