From owner-freebsd-stable@FreeBSD.ORG Wed Jun 29 13:50:48 2005 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC63316A41C for ; Wed, 29 Jun 2005 13:50:48 +0000 (GMT) (envelope-from doug@mcnaught.org) Received: from asmodeus.mcnaught.org (sp-260-1.net4.netcentrix.net [4.21.254.118]) by mx1.FreeBSD.org (Postfix) with ESMTP id 842AC43D49 for ; Wed, 29 Jun 2005 13:50:48 +0000 (GMT) (envelope-from doug@mcnaught.org) Received: from [68.223.20.176] (helo=Douglas-McNaughts-Powerbook.local) by asmodeus.mcnaught.org with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1Dncxh-0007ZC-NO; Wed, 29 Jun 2005 09:50:46 -0400 To: Sven Willenberger References: <1120050088.19603.7.camel@lanshark.dmv.com> From: Douglas McNaught Date: Wed, 29 Jun 2005 09:43:23 -0400 In-Reply-To: <1120050088.19603.7.camel@lanshark.dmv.com> (Sven Willenberger's message of "Wed, 29 Jun 2005 09:01:28 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: stable@freebsd.org, pgsql-general@postgresql.org Subject: Re: [GENERAL] PostgreSQL's vacuumdb fails to allocate memory for non-root users X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2005 13:50:48 -0000 Sven Willenberger writes: > FreeBSD 5.4-Release > PostgreSQL 8.0.3 > > I noticed that the nightly cron consisting of a vacuumdb was failing due > to "unable to allocate memory". I do have maintenance_mem set at 512MB, > and the /boot/loader.conf file sets the max datasize to 1GB (verified by > limit). The odd thing is that if I run the command (either vacuumdb from > the command line or vacuum verbose analyze from a psql session) as the > Unix user root (and any psql superuser) the vacuum runs fine. It is when > the unix user is non-root (e.g. su -l pgsql -c "vacuumdb -a -z") that > this memory error occurs. All users use the "default" class for > login.conf purposes which has not been modified from its installed > settings. Any ideas on how to a) troubleshoot this or b) fix this (if it > is something obvious that I just cannot see). Is the out-of-memory condition occurring on the server or client side? Is there anything in the Postgres logs? You might put a 'ulimit -a' command in your cron script to make sure your memory limit settings are propagating correctly... -Doug