From: Guillaume Smet <guillaume.smet@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL JDBC <pgsql-jdbc@postgresql.org>
Cc: thierry.buffet@fr.nurun.com
Subject: Re: Memory leaks using refcursors
Date: Thu, 18 Jan 2007 00:27:53 +0100
Message-ID: <1d4e0c10701171527u744fd81eh6de7908599349af3@mail.gmail.com> (raw)
In-Reply-To: <6135.1169073075@sss.pgh.pa.us>
References: <1d4e0c10701171053t55e60a2epf3e395b5b97101b5@mail.gmail.com>
<1d4e0c10701171422u2e9d8758ia663dd1f826f8258@mail.gmail.com>
<6135.1169073075@sss.pgh.pa.us>
Hi Tom,
On 1/17/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> While I agree that the driver probably should do that, I'm not sure why
> you are having a problem. A cursor doesn't normally accumulate its
> result set in memory on the backend side, so I wouldn't have expected
> all that big a memory leak. What queries are you executing?
I don't know exactly how much queries are executed during this
transaction but it's a lot of queries and they are _all_ executed
through stored proc returning cursors.
The self contained test case is available here:
http://people.openwide.fr/~gsmet/postgresql/refcursor_problem/ and
especially the stored proc is in the readme file along with all the
instructions to run the test case.
I just run a test case with 10k iterations and the backend which
executes the queries uses 236 MB of memory before the commit.
--
Guillaume
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: guillaume.smet@gmail.com, tgl@sss.pgh.pa.us, thierry.buffet@fr.nurun.com
Subject: Re: Memory leaks using refcursors
In-Reply-To: <1d4e0c10701171527u744fd81eh6de7908599349af3@mail.gmail.com>
References: <1d4e0c10701171053t55e60a2epf3e395b5b97101b5@mail.gmail.com> <1d4e0c10701171422u2e9d8758ia663dd1f826f8258@mail.gmail.com> <6135.1169073075@sss.pgh.pa.us> <1d4e0c10701171527u744fd81eh6de7908599349af3@mail.gmail.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