pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: John R Pierce <pierce@hogranch.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Connection.setReadOnly()
Date: Fri, 11 Dec 2009 13:41:28 +1300
Message-ID: <4B219538.2090203@opencloud.com> (raw)
In-Reply-To: <4B219025.5070607@hogranch.com>
References: <4B21737B.50009@hogranch.com>
	<alpine.BSO.2.00.0912101744080.30821@leary.csoft.net>
	<4B219025.5070607@hogranch.com>

John R Pierce wrote:
> Kris Jurka wrote:
>> Just because your connection is readonly doesn't mean that everyone
>> elses is as well.  If you want a consistent view of the database you
>> can get that with a serializable transaction.
> 
> my oracle developers are screaming bloody murder over this.
> 
> they have processes that do nothing but reads.   jdbc tosses a BEGIN;
> out automatically.   these processes never Commit(); on a read, why
> should they?

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?

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

> per all my Oracle people this is totally unacceptable and they are ready to cancel any further postgres projects. 

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.

-O



view thread (17+ messages)  latest in thread

Message-ID: <4B219538.2090203@opencloud.com>
Permalink:  ../4B219538.2090203@opencloud.com/
Also on:    postgresql.org/message-id/4B219538.2090203@opencloud.com

 · 

reply

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: oliver@opencloud.com, pierce@hogranch.com
  Subject: Re: Connection.setReadOnly()
  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>

* 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