Out of memory error

Lists: pgsql-jdbc
From: "Andrea Cannarsa" <a(dot)cannarsa(at)cogitas(dot)it>
To: <pgsql-jdbc(at)PostgreSQL(dot)org>
Subject: Out of memory error
Date: 2003-12-09 10:08:04
Message-ID: 002801c3be3c$56146c00$6b01a8c0@cogitas.locale
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Hello, i have a problem with my jdbc driver. When i do a select on a table within a blob object
my java application send an error message : "java.lang.out.of.memoryerror". Now i have try the same select with EMS PostgreSQL Manager and the resultset is correct.
I'm using the PostgreSQL ver. 7.3 for windows and the "pg73jdbc3.jar JDBC - Driver".

Who can help me? How can i solve my problem?

Thanks Andrea


From: Kris Jurka <books(at)ejurka(dot)com>
To: Andrea Cannarsa <a(dot)cannarsa(at)cogitas(dot)it>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Out of memory error
Date: 2003-12-09 22:28:56
Message-ID: Pine.LNX.4.33.0312091646290.3369-100000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Tue, 9 Dec 2003, Andrea Cannarsa wrote:

> Hello, i have a problem with my jdbc driver. When i do a select on a
> table within a blob object my java application send an error message :
> "java.lang.out.of.memoryerror". Now i have try the same select with
> EMS PostgreSQL Manager and the resultset is correct. I'm using the
> PostgreSQL ver. 7.3 for windows and the "pg73jdbc3.jar JDBC - Driver".
>
> Who can help me? How can i solve my problem?
>

How big is the bytea field? The JDBC driver is not very efficient with
transferring this and may use 2 or 3 times the memory required. Consider
increasing the memory available to the JVM. Also if the query returns
multiple rows consider streaming the result set using setFetchSize().

Kris Jurka