Re: Re: [HACKERS] New parameter RollbackError to control rollback behavior on error

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, PostgreSQL mailing lists <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Re: [HACKERS] New parameter RollbackError to control rollback behavior on error
Date: 2014-03-31 12:46:07
Message-ID: CAB7nPqRE8tWGBjHgk6X8iVNG+io9wGqWnW5JgxEVFTyHTtjkWw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-odbc

Unfortunately I sent this patch to hackers once again... For ODBC
users please use the patch on this email.

> * I'm not too fond of the RollbackError name. It sounds like "an error while
> rolling back". I googled around and found out that DataDirect's proprietary
> driver has the same option, and they call it TransactionErrorBehavior. See
> http://blogs.datadirect.com/2013/07/solution-unexpected-postgres-current-transaction-aborted-error.html.
>
> * Instead of using 0-2 as the values, let's give them descriptive names.
> Something like "none", "RollbackTransaction", "RollbackStatement".
> (actually, we'll probably want to also allow the integers, to keep the
> connection string short, as there is a size limit on that)

I have been working more on that, resulting in the patch attached. The
parameter name is changed to TransactionErrorBehavior, able to use the
values "Statement", "Nop", "Transaction" and "Default". "Default"
corresponds to the default behavior, that is used to set the rollback
behavior depending on the Postgres version driver is connected with.
As of now, TransactionErrorBehavior does not accept integer values as
it makes the patch a bit more simple, this could be added with some
atoi calls in dlg_specific.c.

I have updated dlg_wingui.c as well. Patch has always its set of docs
and regression tests.

On Sat, Mar 29, 2014 at 7:16 AM, Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp> wrote:
> There are some rollback_on_error in dlg_wingui.c.
Corrected in the patch attached.

Regards,
--
Michael

Attachment Content-Type Size
20140331_error_rollback_v2.patch text/plain 32.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-03-31 13:02:15 Re: MultiXactId error after upgrade to 9.3.4
Previous Message Michael Paquier 2014-03-31 12:43:21 Re: New parameter RollbackError to control rollback behavior on error

Browse pgsql-odbc by date

  From Date Subject
Next Message Barry Bell 2014-03-31 14:56:55 Re: FW: ODBC 9.3.0210 not commiting, Discard ALL
Previous Message Michael Paquier 2014-03-31 12:43:21 Re: New parameter RollbackError to control rollback behavior on error