Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 5E92863264C for ; Sat, 27 Feb 2010 18:39:16 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 46937-08 for ; Sat, 27 Feb 2010 22:39:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by mail.postgresql.org (Postfix) with ESMTP id A8B23632314 for ; Sat, 27 Feb 2010 18:39:05 -0400 (AST) Received: from localhost (access [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 11FAE1E0443; Sun, 28 Feb 2010 06:39:02 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (access.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id LjedEMpcDVrB; Sun, 28 Feb 2010 06:39:00 +0800 (WST) Received: from [10.1.1.2] (124-169-107-144.dyn.iinet.net.au [124.169.107.144]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id C90E21E0442; Sun, 28 Feb 2010 06:38:59 +0800 (WST) Message-ID: <4B899EFD.90200@postnewspapers.com.au> Date: Sun, 28 Feb 2010 06:38:53 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: Chris CC: pgsql-performance@postgresql.org Subject: Re: How to troubleshoot high mem usage by postgres? References: <57033cf81002271429wb0da13am37b3cb6258103ea5@mail.gmail.com> In-Reply-To: <57033cf81002271429wb0da13am37b3cb6258103ea5@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/392 X-Sequence-Number: 37813 On 28/02/2010 6:29 AM, Chris wrote: > If I am indeed doing everything I can to release the resources (and > I'm 95% sure I am) then it looks like the pgsql extension is at fault > here. Before assuming some particular thing is at fault, you need to collect some information to determine what is actually happening. What are your queries? What are the resource-releasing functions you're using, and how? Can you boil this down to a simple PHP test-case that connects to a dummy database and repeats something that causes the backend to grow in memory usage? Trying to do this - by progressively cutting things out of your test until it stops growing - will help you track down what, exactly, is causing the growth. It'd be helpful if you could also provide some general system information, as shown here: http://wiki.postgresql.org/wiki/Guide_to_reporting_problems -- Craig Ringer