Re: BUG #15977: Inconsistent behavior in chained transactions

From: fn ln <emuser20140816(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: 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-03 13:27:49
Message-ID: CA+99BHqVJC-ZPaDW5Lmyj5q3wS0tvmYNo+xLoG8ANp7jzZ+gwg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

We have three options:
1. Prohibit AND CHAIN outside a transaction block, but do nothing in
plain COMMIT/ROLLBACK or AND NO CHAIN.
2. Deal "there is no transaction in progress" (and "there is already a
transaction in progress" if needed) as an error.
3. Leave as it is.

Option 1 makes overall behavior more inconsistent, and option 2 might cause
the backward-compatibility issues.
So I think 3 is a better solution for now.

2019年9月3日(火) 18:55 Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>:

> On 2019-08-29 16:58, Fabien COELHO wrote:
> >
> >> Thanks, I got it. I have never made a patch before so I'll keep it in
> my
> >> mind. Self-contained patch is now attached.
> >
> > v3 applies, compiles, "make check" ok.
> >
> > I turned it ready on the app.
>
> Should we make it an error instead of a warning?
>
> --
> Peter Eisentraut http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2019-09-03 16:30:43 Re: BUG #15989: Cluster unable to open as hot standby after SIGKILL during exclusive backup
Previous Message Fabien COELHO 2019-09-03 10:03:26 Re: BUG #15977: Inconsistent behavior in chained transactions

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-09-03 13:31:36 Re: Locking a row with KEY SHARE NOWAIT blocks
Previous Message Heikki Linnakangas 2019-09-03 13:22:30 Locking a row with KEY SHARE NOWAIT blocks