pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: roman <xroot@mail.ru>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Using bytea with ResultSet.getBytes("..."). Problem. Help!!
Date: Thu, 19 Jul 2007 08:34:00 -0400 (EDT)
Message-ID: <Pine.BSO.4.64.0707190832140.13046@leary.csoft.net> (raw)
In-Reply-To: <003001c7c9bc$1da75a50$5405a8c0@nnp.nsk.su>
References: <003001c7c9bc$1da75a50$5405a8c0@nnp.nsk.su>



On Thu, 19 Jul 2007, roman wrote:

> I have a problem with reading big binary data from BYTEA field. I write 
> to it about 16MB pdf file (as byte[] array) sucessfully, but when I try 
> to read it back I have an exception:
>
> Exception occurred during event dispatching:
> java.lang.OutOfMemoryError: Java heap space
>        at org.postgresql.util.PGbytea.toBytes(PGbytea.java:53)

You don't mention what driver version you are using, but 8.2-504 and 
higher will be slightly stingier about the amount of memory it uses.  You 
still need a lot of memory to retrieve large results, but this version is 
better.

Kris Jurka



view thread (3+ messages)

Message-ID: <Pine.BSO.4.64.0707190832140.13046@leary.csoft.net>
Permalink:  ../Pine.BSO.4.64.0707190832140.13046@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.64.0707190832140.13046@leary.csoft.net

 · 

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: books@ejurka.com, xroot@mail.ru
  Subject: Re: Using bytea with ResultSet.getBytes("..."). Problem. Help!!
  In-Reply-To: <Pine.BSO.4.64.0707190832140.13046@leary.csoft.net>
  References: <003001c7c9bc$1da75a50$5405a8c0@nnp.nsk.su> <Pine.BSO.4.64.0707190832140.13046@leary.csoft.net>

* 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