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