From owner-freebsd-questions@FreeBSD.ORG Sun Dec 28 10:34:10 2003 Return-Path: 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 5302916A4CE for ; Sun, 28 Dec 2003 10:34:10 -0800 (PST) Received: from be-well.no-ip.com (lowellg.ne.client2.attbi.com [66.30.200.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5275143D39 for ; Sun, 28 Dec 2003 10:34:09 -0800 (PST) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: by be-well.no-ip.com (Postfix, from userid 1147) id D7851E; Sun, 28 Dec 2003 13:34:08 -0500 (EST) Sender: lowell@be-well.ilk.org To: freebsd-questions@freebsd.org References: <200312280948.15063.fbsd-questions@trini0.org> <44n09cj142.fsf@be-well.ilk.org> <200312281303.14444.fbsd-questions@trini0.org> <3FEF1FC2.6000701@mindcore.net> From: Lowell Gilbert Date: 28 Dec 2003 13:34:08 -0500 In-Reply-To: <3FEF1FC2.6000701@mindcore.net> Message-ID: <44zndcu6zj.fsf@be-well.ilk.org> Lines: 18 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: Log Rotation X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2003 18:34:10 -0000 Scott W writes: > Just a guess here, but what the problem likely is is that Postgres > keeps a file descriptor open to it's logfile, which means that > 'simple' log rotation, eg just moving the original logfile to a backup > name or gzipped file will break the logging as pg won't have a valid > file descriptor any more. This one's bit a project I worked on > forever ago (on a production system! :-( ) running Solaris and > Sybase... > > The easy solution is to see if any of the log rotation scripts have > the 'right' behavior...if not, you can write your own script to do it, > test it by rotating the logs and then intentionally doing something to > produce log output (depending on your log level)...if you get the log > output, everything's happy. Postgres knows how to use syslog(8) for its logging, which is another option also quite simple...