Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 3867E6329AA for ; Fri, 11 Dec 2009 10:37:38 -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 84392-01 for ; Fri, 11 Dec 2009 14:37:30 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by mail.postgresql.org (Postfix) with ESMTP id 75AE263296B for ; Fri, 11 Dec 2009 10:37:30 -0400 (AST) Received: from localhost (access [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 33ECA1E0448; Fri, 11 Dec 2009 22:37:25 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (access.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 9Rpo86PCHoTN; Fri, 11 Dec 2009 22:37:23 +0800 (WST) Received: from [10.1.1.5] (124-169-88-117.dyn.iinet.net.au [124.169.88.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id 57FD71E0442; Fri, 11 Dec 2009 22:37:23 +0800 (WST) Message-ID: <4B225922.1090705@postnewspapers.com.au> Date: Fri, 11 Dec 2009 22:37:22 +0800 From: Craig Ringer User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Oliver Jowett CC: John R Pierce , pgsql-jdbc@postgresql.org Subject: Re: Connection.setReadOnly() References: <4B21737B.50009@hogranch.com> <4B219025.5070607@hogranch.com> <4B219538.2090203@opencloud.com> <4B2198E4.5090306@hogranch.com> <4B219D76.1080600@opencloud.com> In-Reply-To: <4B219D76.1080600@opencloud.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/22 X-Sequence-Number: 20103 Oliver Jowett wrote: > John R Pierce wrote: >> Oliver Jowett wrote: > >>> 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. > > Maybe not, but it's a fairly well known quirk of Postgresql that > long-running transactions don't work so well; the JDBC driver is no > different to any other interface in this regard. Does Pg have issues with long-running read-only transactions in read-committed mode? Or are they an exception to the usual "avoid long-running mostly-idle transactions" guideline? Pg doesn't have to worry about retaining old rows in vacuum with such a statement, because each new statement creates a new snapshot, so if it's idle it effectively has _no_ snapshot and vacuum is free to clear old rows. It doesn't need to keep track of anything to roll back, since the transaction is read only. So ... for READ COMMITTED, READ ONLY transactions, _are_ there any VACUUM issues? -- Craig Ringer