Connection Properties for FetchSize and Autocommit

From: David Langton <djlangton+pgjdbc(at)googlemail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Connection Properties for FetchSize and Autocommit
Date: 2009-10-08 20:02:27
Message-ID: 7c49e7040910081302v284f417bk6301b39e3eee474b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi pgjdbc coders,

I recently had to deal with a 3rd party application (without source code)
that processed large result sets, and kept running out of memory on the
client. I realise this was because the application didn't set a fetch size,
nor turn off autocommit and so the criteria for the driver to use a
cursor-based result set were not met.

Since I cannot modify the application, I instead altered the postgresql jdbc
driver instead to allow two additional driver parameters - defaultFetchSize
and defaultAutoCommit to override the built-in defaults (0 and true).

Anyway, it worked well for me, so for what its worth a diff is attached.
All test cases still pass. If you think this is worth pursuing, let me know
what else needs to be done!

David Langton

Attachment Content-Type Size
diff.txt text/plain 6.0 KB

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2009-10-09 09:59:36 Re: Connection Properties for FetchSize and Autocommit
Previous Message Ying-Wen Chen 2009-10-06 12:29:29 callable statement cannot work when call stored procedure @postgres84