Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id E32B86332C4 for ; Sun, 11 Oct 2009 19:17:10 -0300 (ADT) 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 01726-09 for ; Sun, 11 Oct 2009 22:17:02 +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 00B3563304E for ; Sun, 11 Oct 2009 19:17:02 -0300 (ADT) Received: from 122-57-44-76.jetstream.xtra.co.nz ([122.57.44.76] helo=[192.168.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Mx6il-0005Qe-J0; Mon, 12 Oct 2009 11:16:55 +1300 Message-ID: <4AD25958.9010906@opencloud.com> Date: Mon, 12 Oct 2009 11:16:56 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: David Langton CC: pgsql-jdbc@postgresql.org Subject: Re: Connection Properties for FetchSize and Autocommit References: <7c49e7040910081302v284f417bk6301b39e3eee474b@mail.gmail.com> <4ACF0988.4080909@opencloud.com> <7c49e7040910090935n6973d5c0xd9082ea926f90526@mail.gmail.com> In-Reply-To: <7c49e7040910090935n6973d5c0xd9082ea926f90526@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: 200910/9 X-Sequence-Number: 20011 David Langton wrote: >> David Langton wrote: >>> defaultAutoCommit >> That seems a pretty dangerous setting to have :/ >> >> -O >> > > I'm not sure! Without this parameter, you get a connection in > autocommit mode anyway. If you actually set the mode yourself you get > whatever it is you want. This parameter simply allows you to > initially set autocommit to false in the url for those (rare) > situations where it is what you want, but you can't modify the calling > application. > > However, I'm certainly not any sort of JDBC expert, it just helped me > out a lot to be able to do this (along with fetchsize) to avoid > getting the whole result set sent to the driver all at once. If I > could alter the application, I would have (and that would have been a > better place to do it!). The issue I see is that it can cause silent data loss. An application that expects the documented API default - autocommit on - and just does some UPDATEs is going to throw away all its changes if autocommit is mysteriously off by default, because it's never going to call commit(). -O