From owner-freebsd-questions@FreeBSD.ORG Tue May 23 21:08:25 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9BC8D16B083 for ; Tue, 23 May 2006 21:08:25 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B43143D62 for ; Tue, 23 May 2006 21:08:18 +0000 (GMT) (envelope-from wmoran@collaborativefusion.com) Received: from vanquish.pgh.priv.collaborativefusion.com (vanquish.pgh.priv.collaborativefusion.com [192.168.2.61]) (AUTH: PLAIN wmoran, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Tue, 23 May 2006 17:08:17 -0400 id 00056416.447379C1.0000DC86 Date: Tue, 23 May 2006 17:08:16 -0400 From: Bill Moran To: Kirk Strauser Message-Id: <20060523170816.636e569f.wmoran@collaborativefusion.com> In-Reply-To: <200605231537.26304.kirk@strauser.com> References: <200605231537.26304.kirk@strauser.com> Organization: Collaborative Fusion X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.17; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: PostgreSQL uses more memory on 6.1? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2006 21:08:33 -0000 On Tue, 23 May 2006 15:37:25 -0500 Kirk Strauser wrote: > I just upgraded from 6-STABLE as of 2006-02-18 to 6-STABLE as of 2006-05-21, > and was surprised to find that PostgreSQL wouldn't start because it > couldn't allocate enough shared memory. Thing is, I didn't make a single > hardware change during the reboot and didn't upgrade any ports on the > machine. > > My emergency fix was to edit postgresql.conf to change shared_buffers from > 8192 to 2048. Unfortunately, that seems to be hurting performance - I'm > getting annoying deadlocks at 4AM whenever multiple daemons start their > overnight batch runs. > > Has anyone else seen this behavior when upgrading from 6.0 to 6.1? Any > ideas for a fix? > > I apologize for not having a logfiles, but I was pretty much in a panic to > get it back up and running ASAP and didn't think about it until it was too > late. Quick patch: Use sysctl to bump up kern.ipc.* values as needed (probably shmmax) You should then be able to return your postgresql.conf values to whatever performs well Ultimate fix: Figure out why these values changed. Most likely the result of a different kernel config file. Either put the workable values in a kernel config that will persist across upgrades, or put them in /etc/sysctl.conf so you don't lose them. -- Bill Moran Collaborative Fusion Inc. **************************************************************** IMPORTANT: This message contains confidential information and is intended only for the individual named. If the reader of this message is not an intended recipient (or the individual responsible for the delivery of this message to an intended recipient), please be advised that any re-use, dissemination, distribution or copying of this message is prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. ****************************************************************