Re: more contrib: log rotator

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Andrew Sullivan <andrew(at)libertyrms(dot)info>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: more contrib: log rotator
Date: 2003-04-04 17:10:22
Message-ID: Pine.LNX.4.33.0304041002480.22611-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 4 Apr 2003, Andrew Sullivan wrote:

> On Fri, Apr 04, 2003 at 09:16:39AM -0700, scott.marlowe wrote:
> > where -r is the rotation period in seconds. If it's an external program
>
> Ours rotates based on size rather than time. I can see some
> advantages to the time-based approach, but if you have wide
> variations in traffic, you run the risk of rotating over useful files
> with more or less empty ones if you use it.

I would want time based for sure, and I can see the use for size based
splitting as well. I wouldn't be hard to have it do both would it?

I just like the idea of it being one of the dozens or so options for
pg_ctl so it's painless to use for joe six pack.

pg_ctl -r 86400 -l $PGDATA/logs/pgsql

where -r is the rotation period

OR

pg_ctl -f 10M -l $PGDATA/logs/pgsql

where -f is the max file size of a log

I'd recommend that the nameing convnention should probably
be:

filenamespec.timestamp, like: $PGDATA/logs/pgsql.1049414400

for time rotated logs, and

filename.incnumber like: $PGDATa/logs/pgsql.0000000001

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2003-04-04 17:13:37 Re: more contrib: log rotator
Previous Message Ed L. 2003-04-04 17:06:42 Re: more contrib: log rotator