From: Oliver Jowett <oliver@opencloud.com>
To: jonathan.lister@vaisala.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Is there a size limit on setBinaryStream?
Date: Mon, 29 Nov 2004 01:39:40 +1300
Message-ID: <41A9C70C.9090503@opencloud.com> (raw)
In-Reply-To: <0077BA604D38D311918B00508B44425802AAEA34@birsrv01.vaisala.com>
References: <0077BA604D38D311918B00508B44425802AAEA34@birsrv01.vaisala.com>
jonathan.lister@vaisala.com wrote:
> I am using pg74.215.jdbc3.jar [...]
> My code is very similar to the example given in the documentation. It
> seems to work OK for files up to around 780k, but when I try a larger
> file (e.g. 5,498k it seems to just "hang" .. no exception, no error report).
I suspect continuous GC is the cause, especially if you're running with
a small heap. Try turning on -verbose:gc and see what you get.
You will have more success with large binary objects if you use the
development driver. The stable driver creates a lot of intermediate
representations when you use setBytes() or setBinaryStream(). This means
you need perhaps 10-20 times the stream's length in temporary heap space.
The development driver streams the data directly, and should only need a
small constant-sized intermediate buffer regardless of the stream length.
-O
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, jonathan.lister@vaisala.com
Subject: Re: Is there a size limit on setBinaryStream?
In-Reply-To: <41A9C70C.9090503@opencloud.com>
References: <0077BA604D38D311918B00508B44425802AAEA34@birsrv01.vaisala.com> <41A9C70C.9090503@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