Re: jdbc and large binary files - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: jdbc and large binary files
Date
Msg-id 41311ADF.9060207@opencloud.com
Whole thread Raw
In response to jdbc and large binary files  (Warren Little <wlittle@securitylending.com>)
List pgsql-jdbc
Warren Little wrote:
> Hello,
>    I'm currently using the LO api with the oid data type for storing
> large objects.  I would like to switch to bytea data.  When I last
> tested this idea (over 8 months ago) I experienced massive memory bloat
> in the JDBC application.  I recall seeing some threads on fixing this
> problem.  Can anyone tell me if this issue has been addressed in the
> latest driver?

PreparedStatement.setBinaryStream() will now stream data directly to the
server with no additional heap storage needed. setBytes() takes a copy
of the bytearray it is given, but otherwise behaves like setBinaryStream().

ResultSet still stores the whole value on heap. To avoid this requires
protocol modifications.

-O

pgsql-jdbc by date:

Previous
From: Warren Little
Date:
Subject: jdbc and large binary files
Next
From: Dave Cramer
Date:
Subject: Re: broken docmentation link