From: Oliver Jowett <oliver@opencloud.com>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Prepared statement leak
Date: Wed, 05 Apr 2006 10:33:05 +1200
Message-ID: <4432F421.2030402@opencloud.com> (raw)
In-Reply-To: <200604041538.14171.peter_e@gmx.net>
References: <200604041538.14171.peter_e@gmx.net>
Peter Eisentraut wrote:
> We seem to have identified a prepared statement leak in the JDBC driver. The
> actual application runs through Hibernate, so we have attempted to isolate
> the problem here. In the field, the problem causes the PostgreSQL server to
> run out of memory in linear time.
If you force a full GC on the Java side (i.e. call System.gc()), does
the driver clean up those leaked statements on the next query? In
theory, if the driver leaks references to a server-side prepared
statement it should reclaim the server statements when weak references
next get collected, which may take some time if the Java side is not
generating much garbage (weak references only get collected on a full
GC). Obviously we don't want to leak them in the first place, but I put
that mechanism in place in case we did.
-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, peter_e@gmx.net
Subject: Re: Prepared statement leak
In-Reply-To: <4432F421.2030402@opencloud.com>
References: <200604041538.14171.peter_e@gmx.net> <4432F421.2030402@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