Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id D43769FA26D for ; Wed, 17 Jan 2007 18:32:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 20599-07 for ; Wed, 17 Jan 2007 18:31:45 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 71B8A9F93E5 for ; Wed, 17 Jan 2007 18:31:48 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l0HMVFB7006136; Wed, 17 Jan 2007 17:31:15 -0500 (EST) To: "Guillaume Smet" cc: "PostgreSQL JDBC" , thierry.buffet@fr.nurun.com Subject: Re: Memory leaks using refcursors In-reply-to: <1d4e0c10701171422u2e9d8758ia663dd1f826f8258@mail.gmail.com> References: <1d4e0c10701171053t55e60a2epf3e395b5b97101b5@mail.gmail.com> <1d4e0c10701171422u2e9d8758ia663dd1f826f8258@mail.gmail.com> Comments: In-reply-to "Guillaume Smet" message dated "Wed, 17 Jan 2007 23:22:54 +0100" Date: Wed, 17 Jan 2007 17:31:15 -0500 Message-ID: <6135.1169073075@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/112 X-Sequence-Number: 16477 "Guillaume Smet" writes: > Isn't there a way to keep the cursor name and close it automatically > when the statement or the resulting result set is closed? 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? regards, tom lane