Re: JDBC behaviour - Mailing list pgsql-jdbc

From David G. Johnston
Subject Re: JDBC behaviour
Date
Msg-id CAKFQuwbo6QZ7dae91mPcnXJyija4EfDX4=F_ULta2hXf4XwbEw@mail.gmail.com
Whole thread Raw
In response to Re: JDBC behaviour  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: JDBC behaviour  (Vitalii Tymchyshyn <vit@tym.im>)
Re: JDBC behaviour  (Vitalii Tymchyshyn <vit@tym.im>)
List pgsql-jdbc
On Saturday, February 20, 2016, Craig Ringer <craig@2ndquadrant.com> wrote:
On 20 February 2016 at 19:05, John R Pierce <pierce@hogranch.com> wrote:
 

to me this seems to break the rules of transaction semantics, but it matches the behavior with autocommit=on  ...


... which doesn't matter, because if you wanted that you'd just set autocommit=on.

I think all this discussion of autocommit is a pointless side-track. Reading between the lines, the real complaint appears to be that we abort the xact if a statement ERRORs, and by default other DBMS vendors don't. OP wants something like psqlODBC's "statement" error-rollback mode where savepoints are done automatically before each statement.


So basically it's a means to obtain some I/O savings by not forcing a WAL flush on every statement while still retaining the semantics of autocommit.

If the final commit fails (or never happens) none of the successful rows appear but otherwise you get some improvement in I/O which is mitigated but the cost of savepoint handling.

David J.

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: JDBC behaviour
Next
From: Vitalii Tymchyshyn
Date:
Subject: Re: JDBC behaviour