Skip site navigation (1)Skip section navigation (2)
Date:      28 Dec 2003 13:34:08 -0500
From:      Lowell Gilbert <>
Subject:   Re: Log Rotation
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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...

Want to link to this message? Use this URL: <>