Re: JDBC behaviour

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC behaviour
Date: 2016-02-20 15:34:14
Message-ID: CAKFQuwbo6QZ7dae91mPcnXJyija4EfDX4=F_ULta2hXf4XwbEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-jdbc

On Saturday, February 20, 2016, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:

> On 20 February 2016 at 19:05, John R Pierce <pierce(at)hogranch(dot)com
> <javascript:_e(%7B%7D,'cvml','pierce(at)hogranch(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vitalii Tymchyshyn 2016-02-20 16:01:04 Re: JDBC behaviour
Previous Message Dave Cramer 2016-02-20 15:10:40 Re: JDBC behaviour

Browse pgsql-hackers by date

  From Date Subject
Next Message Vitalii Tymchyshyn 2016-02-20 16:01:04 Re: JDBC behaviour
Previous Message Dave Cramer 2016-02-20 15:10:40 Re: JDBC behaviour

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vitalii Tymchyshyn 2016-02-20 16:01:04 Re: JDBC behaviour
Previous Message Dave Cramer 2016-02-20 15:10:40 Re: JDBC behaviour