From: | Shay Rojansky <roji(at)roji(dot)org> |
---|---|
To: | Dave Cramer <davecramer(at)postgres(dot)rocks> |
Cc: | 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: | 2020-03-30 21:06:39 |
Message-ID: | CADT4RqAHVBw8UuLBRmsB33aEanFsu3zHkg-r7h5S+huh1mq2VQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Apologies for not responding earlier, busy times.
Fourth, it is not clear how many applications would break if COMMIT
>> started issuing an error rather than return success a with ROLLBACK tag.
>> Certainly SQL scripts would be fine. They would have one additional
>> error in the script output, but if they had ON_ERROR_STOP enabled, they
>> would have existed before the commit. Applications that track statement
>> errors and issue rollbacks will be fine. So, we are left with
>> applications that issue COMMIT and expect success after a transaction
>> block has failed. Do we know how other database systems handle this?
>>
>
> Well I know pgjdbc handles my patch fine without any changes to the code
> As I mentioned upthread 2 of the 3 go drivers already error if rollback is
> returned. 1 of them does not.
>
> I suspect npgsql would be fine. Shay ?
>
Npgsql would be fine. In fact, Npgsql doesn't have any specific
expectations nor any specific logic around commit; it assumes errors may be
returned for any command (COMMIT or otherwise), and surfaces those errors
as .NET exceptions. The transaction status is tracked via CommandComplete
only, and as mentioned several times, PostgreSQL can already error on
commit for various other reasons (e.g. deferred constraint checks). This
direction makes a lot of sense to me.
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2020-03-30 21:08:01 | Re: backup manifests |
Previous Message | Robert Haas | 2020-03-30 20:43:59 | Re: backup manifests |