Re: BUG #15977: Inconsistent behavior in chained transactions

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, fn ln <emuser20140816(at)gmail(dot)com>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15977: Inconsistent behavior in chained transactions
Date: 2019-09-07 10:16:51
Message-ID: 20190907101651.pt7yqdqmdb5ba2hm@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Hi,

On 2019-09-06 16:54:15 +0900, Michael Paquier wrote:
> On Thu, Sep 05, 2019 at 02:11:35PM -0700, Andres Freund wrote:
> > On 2019-09-05 14:16:11 +0200, Peter Eisentraut wrote:
> >> I'm content with this patch.
> >
> > Would need tests.
>
> The latest patch sends adds coverage for all the new code paths
> added. Do you have something else in mind?

Missed them somehow. But I don't think they're quite sufficient. I think
at least we also need tests that test things like multi-statement
exec_simple-query() *with* explicit transactions and chaining.

> >> Better disable questionable cases now and maybe re-enable them later
> >> if someone wants to make a case for it.
> >
> > I do think the fact that COMMIT in multi-statement implicit transaction
> > has some usecase, is an argument for just implementing it properly...
>
> Like Peter, I would also keep an ERROR for now, as we could always
> relax that later on.

I mean, I agree it's better to err that way, but it still seems
unnecessary to design things in a way that prevents legit cases, that we
then may have to allow later. Error -> no error is a behavioural change
too, even if obviously less likely to cause problems.

Greetings,

Andres Freund

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Fabien COELHO 2019-09-07 13:23:05 Re: BUG #15977: Inconsistent behavior in chained transactions
Previous Message fn ln 2019-09-07 09:58:20 Re: BUG #15977: Inconsistent behavior in chained transactions

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2019-09-07 13:23:05 Re: BUG #15977: Inconsistent behavior in chained transactions
Previous Message fn ln 2019-09-07 09:58:20 Re: BUG #15977: Inconsistent behavior in chained transactions