From: John R Pierce <pierce@hogranch.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Connection.setReadOnly()
Date: Thu, 10 Dec 2009 16:57:08 -0800
Message-ID: <4B2198E4.5090306@hogranch.com> (raw)
In-Reply-To: <4B219538.2090203@opencloud.com>
References: <4B21737B.50009@hogranch.com>
<alpine.BSO.2.00.0912101744080.30821@leary.csoft.net>
<4B219025.5070607@hogranch.com>
<4B219538.2090203@opencloud.com>
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' :)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: pierce@hogranch.com, oliver@opencloud.com
Subject: Re: Connection.setReadOnly()
In-Reply-To: <4B2198E4.5090306@hogranch.com>
References: <4B21737B.50009@hogranch.com> <alpine.BSO.2.00.0912101744080.30821@leary.csoft.net> <4B219025.5070607@hogranch.com> <4B219538.2090203@opencloud.com> <4B2198E4.5090306@hogranch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox