Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id CB225B5DC3F for ; Tue, 1 Nov 2011 01:26:39 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 35718-04 for ; Tue, 1 Nov 2011 04:26:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail.catalyst.net.nz (bertrand.catalyst.net.nz [202.78.240.40]) by mail.postgresql.org (Postfix) with ESMTP id 976A9B5DC22 for ; Tue, 1 Nov 2011 01:26:33 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mail.catalyst.net.nz (Postfix) with ESMTP id 00EBD32528; Tue, 1 Nov 2011 17:26:31 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at catalyst.net.nz Received: from mail.catalyst.net.nz ([127.0.0.1]) by localhost (bertrand.catalyst.net.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uzn6tbDssLhn; Tue, 1 Nov 2011 17:26:30 +1300 (NZDT) Received: from [IPv6:2404:130:0:1000:222:15ff:fe5c:2471] (unknown [IPv6:2404:130:0:1000:222:15ff:fe5c:2471]) (Authenticated sender: mark.kirkwood) by mail.catalyst.net.nz (Postfix) with ESMTPSA id 6E5B532511; Tue, 1 Nov 2011 17:26:30 +1300 (NZDT) Message-ID: <4EAF74F6.6020200@catalyst.net.nz> Date: Tue, 01 Nov 2011 17:26:30 +1300 From: Mark Kirkwood User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Finlay Thompson CC: pgsql-bugs@postgresql.org Subject: Re: BUG #6275: Horrible performance regression References: <201110280242.p9S2gdRI054867@wwwmaster.postgresql.org> In-Reply-To: <201110280242.p9S2gdRI054867@wwwmaster.postgresql.org> 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=-3.101 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-1.201 X-Spam-Level: X-Archive-Number: 201111/5 X-Sequence-Number: 31600 On 28/10/11 15:42, Finlay Thompson wrote: > After upgrading the postgresql*-8.4 packages on ubuntu, to version 8.4.9, > the script suddenly stopped working, and consuming all the ram (16GB) on the > computer (i7). > > If there is one query exhausting all ram, then it could be tricky to catch it in the logs (log duration and friends log the query time on completion... which might be never). If you have vm.overcommit_memory set to 2 then you may get the offending statement in the log when the postgres backend errors out with ENOMEM. If you know the approx time at which memory starts filling up then getting (most of) the query text from pg_stat_activity would enable you to track down the offending sql in your load script. regards Mark