Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 61CAE633CE5 for ; Thu, 10 Dec 2009 20:41:51 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 63515-01 for ; Fri, 11 Dec 2009 00:41:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id 882A3633BC6 for ; Thu, 10 Dec 2009 20:41:43 -0400 (AST) Received: from 219-88-219-64.jetstream.xtra.co.nz ([219.88.219.64] helo=[192.168.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NItZi-0007BX-6T; Fri, 11 Dec 2009 13:41:38 +1300 Message-ID: <4B219538.2090203@opencloud.com> Date: Fri, 11 Dec 2009 13:41:28 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: John R Pierce CC: pgsql-jdbc@postgresql.org Subject: Re: Connection.setReadOnly() References: <4B21737B.50009@hogranch.com> <4B219025.5070607@hogranch.com> In-Reply-To: <4B219025.5070607@hogranch.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200912/15 X-Sequence-Number: 20096 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