Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D60C39FB46C for ; Tue, 16 Oct 2007 11:01:25 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 31929-03 for ; Tue, 16 Oct 2007 11:00:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from ptb-relay01.plus.net (ptb-relay01.plus.net [212.159.14.212]) by postgresql.org (Postfix) with ESMTP id CADE59FB463 for ; Tue, 16 Oct 2007 11:01:14 -0300 (ADT) Received: from [84.51.143.99] (helo=server3.office.archonet.com) by ptb-relay01.plus.net with esmtp (Exim) id 1Ihmyt-0001iq-R4; Tue, 16 Oct 2007 15:01:12 +0100 Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id 0246B27404F; Tue, 16 Oct 2007 15:01:10 +0100 (BST) Message-ID: <4714C426.3080207@archonet.com> Date: Tue, 16 Oct 2007 15:01:10 +0100 From: Richard Huxton User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Jason Lustig CC: pgsql-performance@postgresql.org Subject: Re: Autovacuum running out of memory References: <374EB3D1-EE74-4B8C-9EEC-104ADD097568@brandeis.edu> <4714A458.5060408@archonet.com> <4714AD30.6000103@archonet.com> <57031F92-40D5-4832-8B76-FB73E510C735@brandeis.edu> In-Reply-To: <57031F92-40D5-4832-8B76-FB73E510C735@brandeis.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/174 X-Sequence-Number: 27196 Jason Lustig wrote: > I lowered the maintenance_work_mem to 50MB and am still getting the same > errors: > > Oct 16 09:26:57 [16402]: [1-1] user=,db= ERROR: out of memory > Oct 16 09:26:57 [16402]: [1-2] user=,db= DETAIL: Failed on request of > size 52428798. > Oct 16 09:27:57 [16421]: [1-1] user=,db= ERROR: out of memory > Oct 16 09:27:57 [16421]: [1-2] user=,db= DETAIL: Failed on request of > size 52428798. > Oct 16 09:29:44 [16500]: [1-1] user=,db= ERROR: out of memory > Oct 16 09:29:44 [16500]: [1-2] user=,db= DETAIL: Failed on request of > size 52428798. Hmm - it's now failing on a request of 50MB, which shows it is in fact maintenance_work_mem that's the issue. > Looking at my free memory (from TOP) I find > > Mem: 2062364k total, 1846696k used, 215668k free, 223324k buffers > Swap: 2104496k total, 160k used, 2104336k free, 928216k cached > > So I don't think that I'm running out of memory total... it seems like > it's continually trying to do it. Is there a reason why Postgres would > be doing something without a username or database? Or is that just how > autovacuum works? I've not seen an error at startup before, but if it's not connected yet then that would make sense. I'm guessing this is a per-user limit that the postgres user is hitting. If you "su" to user postgres and run "ulimit -a" that should show you if you have any limits defined. See "man bash" for more details on ulimit. -- Richard Huxton Archonet Ltd