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