Skip site navigation (1)Skip section navigation (2)
Date:      28 Dec 2003 13:34:08 -0500
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Log Rotation
Message-ID:  <44zndcu6zj.fsf@be-well.ilk.org>
In-Reply-To: <3FEF1FC2.6000701@mindcore.net>
References:  <200312280948.15063.fbsd-questions@trini0.org> <44n09cj142.fsf@be-well.ilk.org> <200312281303.14444.fbsd-questions@trini0.org> <3FEF1FC2.6000701@mindcore.net>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Scott W <wegster@mindcore.net> 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...



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?44zndcu6zj.fsf>