Re: Error on failed COMMIT

From: Dave Cramer <davecramer(at)postgres(dot)rocks>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: Tony Locke <tlocke(at)tlocke(dot)org(dot)uk>, Shay Rojansky <roji(at)roji(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Vik Fearing <vik(at)postgresfriends(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>, "Haumacher, Bernhard" <haui(at)haumacher(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Error on failed COMMIT
Date: 2021-01-25 14:09:09
Message-ID: CADK3HHLTf1okSSETZ+KndcBy08R9H-A=kz6hvE1+=ai3aA==Tg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Rebased against head

Here's my summary of the long thread above.

This change is in keeping with the SQL spec.

There is an argument (Tom) that says that this will annoy more people than
it will please. I presume this is due to the fact that libpq behaviour will
change.

As the author of the JDBC driver, and I believe I speak for other driver
(NPGSQL for one) authors as well that have implemented the protocol I would
argue that the current behaviour is more annoying.

We currently have to keep state and determine if COMMIT actually failed or
it ROLLED BACK. There are a number of async drivers that would also benefit
from not having to keep state in the session.

Regards,

Dave Cramer
www.postgres.rocks

On Tue, 10 Nov 2020 at 11:53, Dave Cramer <davecramer(at)postgres(dot)rocks> wrote:

>
>
> On Mon, 9 Nov 2020 at 16:26, Dave Cramer <davecramer(at)postgres(dot)rocks>
> wrote:
>
>>
>>
>> On Wed, 30 Sep 2020 at 18:14, Andrew Dunstan <
>> andrew(dot)dunstan(at)2ndquadrant(dot)com> wrote:
>>
>>>
>>> On 8/4/20 12:19 PM, Dave Cramer wrote:
>>> > Attached is the rebased patch for consideration.
>>> >
>>> >
>>>
>>>
>>> It's a bit sad this has been hanging around so long without attention.
>>>
>>>
>>> The previous discussion seems to give the patch a clean bill of health
>>> for most/all of the native drivers. Are there any implications for libpq
>>> based drivers such as DBD::Pg and psycopg2? How about for ecpg?
>>>
>>>
>>> cheers
>>>
>>>
>>> andrew
>>>
>>>
>>> --
>>> Andrew Dunstan https://www.2ndQuadrant.com
>>> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>>>
>>
>>
>> Attached is a rebased patch with fixes for the isolation tests
>>
>>
>
>>
>> Dave Cramer
>> www.postgres.rocks
>>
>

Attachment Content-Type Size
0001-Throw-error-and-rollback-on-a-failed-transaction-ins.patch application/octet-stream 96.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message bucoo@sohu.com 2021-01-25 14:14:40 Re: Re: parallel distinct union and aggregate support patch
Previous Message Bharath Rupireddy 2021-01-25 13:58:18 Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit