Re: log_filename_prefix --> log_filename + strftime() - Mailing list pgsql-patches

From Ed L.
Subject Re: log_filename_prefix --> log_filename + strftime()
Date
Msg-id 200408271514.27487.pgsql@bluepolka.net
Whole thread Raw
In response to Re: log_filename_prefix --> log_filename + strftime()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: log_filename_prefix --> log_filename + strftime()
List pgsql-patches
On Friday August 27 2004 2:15, Tom Lane wrote:
> "Ed L." <pgsql@bluepolka.net> writes:
> > If log_filename = 'xxx', rotate with strftime() to
> > 'xxx-%Y-%m-%d_%H%M%S'
>
> No, I was thinking that if no %'s in the log_filename, then use xxx.EPOCH
> to provide Apache compatibility.

OK, that works for me.

One addition I'd like to include with the revised patch:  a boolean
postgresql.conf option ('log_truncate_on_rotation', default false) to
truncate any existing log file by the same name.  Default behavior here and
with Apache is to always append, but it's a useful feature for us because
it largely eliminates the issue of logs filling up the disk.  You don't
want the log clobbered on restarts, so the idea is to only truncate during
time/size-based rotation, not on the initial open.  Thoughts?

Ed


pgsql-patches by date:

Previous
From: Joe Conway
Date:
Subject: Re: [SQL] array_in: '{}}'::text[]
Next
From: "Ed L."
Date:
Subject: Re: log_filename_prefix --> log_filename + strftime()