Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A7C14650F2A for ; Tue, 24 Jun 2008 11:56:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 75861-04-3 for ; Tue, 24 Jun 2008 11:56:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id CEAB5650F0A for ; Tue, 24 Jun 2008 11:56:13 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m5OEuAt2016760; Tue, 24 Jun 2008 10:56:10 -0400 (EDT) To: Marc Cousin cc: pgsql-admin@postgresql.org Subject: Re: plpgsql function seems to be leaking memory In-reply-to: <200806241056.29589.mcousin@sigma.fr> References: <200806241056.29589.mcousin@sigma.fr> Comments: In-reply-to Marc Cousin message dated "Tue, 24 Jun 2008 10:56:29 +0200" Date: Tue, 24 Jun 2008 10:56:10 -0400 Message-ID: <16759.1214319370@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/205 X-Sequence-Number: 29543 Marc Cousin writes: > I'm having a problem with plpgsql functions leaking memory. Your example shows absolutely no memory leak here, in either 8.3.3 or CVS HEAD. > I see the postgresql process growing from 8MB to about 400 MB during this > run... What do you have shared_buffers set to? I think you might be getting fooled by top's treatment of shared memory (ie, it starts to count shared pages after the process touches them for the first time). regards, tom lane