X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A528532AB8E for ; Sun, 10 Oct 2004 21:20:25 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 61653-06 for ; Sun, 10 Oct 2004 20:20:19 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id A49B332A9A7 for ; Sun, 10 Oct 2004 21:20:19 +0100 (BST) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1CGkAu-0004zd-00; Mon, 11 Oct 2004 09:20:12 +1300 Message-ID: <4169997A.2060109@opencloud.com> Date: Mon, 11 Oct 2004 09:20:10 +1300 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeffrey Tenny Cc: postgres jdbc Subject: Re: setFetchSize() not working References: <41694A5C.3050402@comcast.net> In-Reply-To: <41694A5C.3050402@comcast.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/80 X-Sequence-Number: 11185 Jeffrey Tenny wrote: > I'm using the 7.3.3 backend, and the JDBC 8.0dev jdbc driver > (pgdev.306.jdbc3.jar). > > I'm calling PreparedStatement.setFetchSize(32), on a table fetching 32KB > BYTEA records, and I'm blowing out memory on the executeQuery() call > of the prepared statement. > > PreparedStatement.getFetchDirection reports 1000, which is > ResultSet.FETCH_FORWARD. > > Any clues? Use a newer backend or an older driver. The development driver only supports cursors when using a V3 protocol connection (supported from 7.4 onwards). You probably want a newer backend anyway even if only the newest 7.3.x, there are data-loss bugs in earlier 7.3 versions. There's no real reason that V2 can't use cursors, it's just that the support has not been reimplemented for the changed protocol layer framework. In general all the new driver work is happening against 7.4/8.0 backends. We do test for correct behaviour against 7.3 servers, but there are no guarantees that the driver is going to perform as well. -O