Connection Properties for FetchSize and Autocommit - Mailing list pgsql-jdbc

From David Langton
Subject Connection Properties for FetchSize and Autocommit
Date
Msg-id 7c49e7040910081302v284f417bk6301b39e3eee474b@mail.gmail.com
Whole thread Raw
Responses Re: Connection Properties for FetchSize and Autocommit  (Oliver Jowett <oliver@opencloud.com>)
List 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

pgsql-jdbc by date:

Previous
From: Ying-Wen Chen
Date:
Subject: callable statement cannot work when call stored procedure @postgres84
Next
From: Oliver Jowett
Date:
Subject: Re: Connection Properties for FetchSize and Autocommit