Re: BUG #4483: setAutoCommit false shouldn't be necessary for fetchSize to work

From: Kris Jurka <books(at)ejurka(dot)com>
To: David Smiley <dsmiley(at)mitre(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4483: setAutoCommit false shouldn't be necessary for fetchSize to work
Date: 2008-10-17 19:06:53
Message-ID: Pine.BSO.4.64.0810171504290.13709@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, 16 Oct 2008, David Smiley wrote:

> Bug reference: 4483
> Description: setAutoCommit false shouldn't be necessary for fetchSize
> to work
> Details:
>
> No matter what is going on internally within the JDBC driver, I don't
> believe disabling autoCommit should be necessary to benefit from the
> fetchSize hint (i.e. cursors). As long as the user code hasn't iterated to
> the end of the resultSet yet, the semantics of autoCommit are irrelevant.

Unless the cursor has been opened WITH HOLD, the cursor will be closed at
transaction end. So to be able to fetch data from the cursor you must not
have autocommit on. Since the JDBC driver uses protocol level cursors
(portals), it doesn't even have the option of specifying WITH HOLD.

Kris Jurka

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Kris Jurka 2008-10-18 13:51:40 Re: Deadlock condition in driver
Previous Message Tom Lane 2008-10-17 17:55:09 Re: 8.2.10 pg_ctl restart will stop but not start server