pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Warren Little <wlittle@securitylending.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: jdbc and large binary files
Date: Sun, 29 Aug 2004 11:53:03 +1200
Message-ID: <41311ADF.9060207@opencloud.com> (raw)
In-Reply-To: <1093735390.2866.6.camel@localhost.localdomain>
References: <1093735390.2866.6.camel@localhost.localdomain>

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



view thread (2+ messages)

Message-ID: <41311ADF.9060207@opencloud.com>
Permalink:  ../41311ADF.9060207@opencloud.com/
Also on:    postgresql.org/message-id/41311ADF.9060207@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, wlittle@securitylending.com
  Subject: Re: jdbc and large binary files
  In-Reply-To: <41311ADF.9060207@opencloud.com>
  References: <1093735390.2866.6.camel@localhost.localdomain> <41311ADF.9060207@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox