Dan Falconer wrote:
> On Wednesday 07 February 2007 2:23 pm, Mark Stosberg wrote:
>> Dan Falconer wrote:
>>> On Wednesday 07 February 2007 1:00 pm, Mark Stosberg wrote:
>>>> Here's a report and a question on log rotation using the altperl tools,
>>>> on FreeBSD.
>>> [ --xxxx-- snip --xxxx--]
>>>
>>>> So I tried the "APACHE_ROTATOR" method, which the altperl tools have
>>>> built-in support for.
>>>>
>>>> That started creating new log files every 10 seconds, which also seemed
>>>> like a bad idea! I created this patch to slon-tools.pm to only create
>>>> one log file per day:
>>> [ --xxxx-- snip --xxxx--]
>>>
>>>> Even then, doesn't that leave me with a pruning job to do? I don't see
>>>> the value of including the time stamp in the log file name. That just
>>>> seems to complicate log file rotation and pruning, and is non-standard
>>>> from what I've seen.
>>>     I encountered this in Slony 1.2.6 as well: in 1.1.0, there was a
>>> configuration parameter, "$ROTATE_TIME", which was fed to the apache
>>> rotator instead of the arbitrary "10M".  Ours was set to 86400 (every 24
>>> hours).  I was assuming it was an oops, but I removed the APACHE_ROTATOR
>>> variable out of my configuration files so it wouldn't even try to rotate
>>> them... which of course means I have to manually restart slony every once
>>> in a while to avoid running out of space.
>> Does it make more sense then to prune out the timestamp stuff out of the
>> APACHE_ROTATOR line, and add the "86400" value back in?
>> Then, would it still be necessary to purge logs every so often?
>>
>>   Mark
> 
>       The timestamp thing *REALLY* pisses me off.  I would at worst having a 
> logname like "$dbname-$dateItStarted.log", at best having "$dbname.log" which 
> is rotated using the standard "$dbname.log.1", "$dbname.log.2", etc... 
> considering the size of the logs on my system (350 megs after a few days), I 
> would prefer them getting zipped, too... but I can do that myself if it can't 
> be worked in.

Could Slony be modified to "let go" of the existing  log file handle
when an HUP is received, like Apache does?  That would allow the
standard features of newsyslog to be used, and would be a lot easier to
manage.

(For example, I don't have Apache on my database services, so I had to
copy 'rotatelogs' from another machine... )

Now I'm using rotatelogs, plus newsyslog for compression, and I've got:

db_2007-02-07.log
db_2007-02-07.log.0.bz2
db_2007-02-08.log
db_2007-02-08.log.0.bz2

Including even just the date in the name still messes up standard log
rotation practices.

   Mark

_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general

Reply via email to