From: Kris Jurka <books@ejurka.com>
To: Antony Paul <antonypaul24@gmail.com>
Cc: PostgreSQL JDBC <pgsql-jdbc@postgresql.org>
Subject: Re: Impact of open ResultSets and PreparedStatements ?
Date: Fri, 29 Apr 2005 03:04:34 -0500 (EST)
Message-ID: <Pine.BSO.4.56.0504290302170.3380@leary.csoft.net> (raw)
In-Reply-To: <2989532e0504260624230facf6@mail.gmail.com>
References: <2989532e0504260624230facf6@mail.gmail.com>
On Tue, 26 Apr 2005, Antony Paul wrote:
> What will happen if I leave ResultSet and PreparedStatement not
> closed and I use a connection pool which is not closing the ResultSet
> and PreparedStatement. Will it cause resource leak in the server ?.
It depends there are two types of PreparedStatements and two types of
ResultSets each one has a version that takes no permanent server resources
and a version that does. A PreparedStatement may keep a permanent
prepared plan on the server and a ResultSet may be backed by a cursor
which also has server state. Its possible you can get away with it, but
it's best to close everything.
Kris Jurka
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, antonypaul24@gmail.com
Subject: Re: Impact of open ResultSets and PreparedStatements ?
In-Reply-To: <Pine.BSO.4.56.0504290302170.3380@leary.csoft.net>
References: <2989532e0504260624230facf6@mail.gmail.com> <Pine.BSO.4.56.0504290302170.3380@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