Re: setFetchSize() not working - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: setFetchSize() not working
Date
Msg-id 4169997A.2060109@opencloud.com
Whole thread Raw
In response to setFetchSize() not working  (Jeffrey Tenny <jeffrey.tenny@comcast.net>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Ulrich Meis
Date:
Subject: proposal concerning the bug about updating a table named "two words"
Next
From: "Serguei Mokhov"
Date:
Subject: Re: New jdbc website