Re: Connection.setReadOnly() - Mailing list pgsql-jdbc

From John R Pierce
Subject Re: Connection.setReadOnly()
Date
Msg-id 4B2198E4.5090306@hogranch.com
Whole thread Raw
In response to Re: Connection.setReadOnly()  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: Connection.setReadOnly()
Re: Connection.setReadOnly()
List pgsql-jdbc
Oliver Jowett wrote:
> Because if they're operating on a connection with autocommit off, the
> JDBC spec is very specific about transaction boundaries, and it would
> actually be incorrect for the driver *not* to start a transaction. I
> have at least one application here that runs readonly queries inside a
> transaction specifically because it wants a consistent view.
>
> Does the Oracle driver not follow the JDBC spec here? Or is it just that
> long-term open transactions don't cause problems on Oracle?
>

the latter.   long term transactions are not a problem for Oracle.   As
I said, they've been using an open transaction with a row lock as a
MUTEX for an app that runs for weeks or even months.


> If your oracle developers don't want manually committed transactions,
> perhaps they should.. turn on autocommit.
>

otherwise, an app thats doing purely read queries has to periodically
issue a Commit().   I have to say, doing Commit() on read operations is
NOT at all intuitive.


> It's somewhat telling that they identify themselves as "Oracle people".
> Postgres isn't identical to Oracle; if you want applications that are
> portable between RDBMSes you need to take some care, and presumably they
> didn't do this originally and are now paying the price.
>

These two SQL developers have been working on this same family of
manufacturing databases in oracle for like 12-15 years.   Its me thats
calling them 'oracle people' :)





pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Connection.setReadOnly()
Next
From: Oliver Jowett
Date:
Subject: Re: Connection.setReadOnly()