Re: Java Memory Issue while Loading Postgres library

From: Ognjen Blagojevic <ognjen(at)etf(dot)bg(dot)ac(dot)rs>
To: A(dot)Bhattacharya(at)sungard(dot)com
Cc: Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Java Memory Issue while Loading Postgres library
Date: 2010-04-30 10:11:12
Message-ID: 4BDAACC0.5090503@etf.bg.ac.rs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

A(dot)Bhattacharya(at)sungard(dot)com wrote:
> We have a java exe making a call to a postgres function. This postgres
> function internally makes a call to a dll (which is written using
> Postgres extended C).
>
> Now the issue is that, when we make a call to this dll, it consumes a
> lot of memory and this memory is getting consumed from the heap space of
> the original java process causing an out of memory exception in Java.
>
> Is this a known issue. Do we have a way to keep these processes disjoint
> and not eat up heap space of the original process?

It seems like your Java code doesn't release the resources (for
instance, not closing result sets, or something similar).

If you could post relevant parts of Java code that would be helpful.
Also post the versions of Postgres and Java you're using.

Regards,
Ognjen

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Sturdivant 2010-04-30 13:53:37 Problem Changing search_path in pgTAP tests
Previous Message Alban Hertroys 2010-04-30 10:06:32 Re: Cumulative count (running total) window fn