Skip site navigation (1) Skip section navigation (2)

Re: log_filename_prefix --> log_filename + strftime()

From: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,Andreas Pflug <pgadmin(at)pse-consulting(dot)de>,pgsql-patches(at)postgresql(dot)org
Subject: Re: log_filename_prefix --> log_filename + strftime()
Date: 2004-08-27 21:14:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
On Friday August 27 2004 2:15, Tom Lane wrote:
> "Ed L." <pgsql(at)bluepolka(dot)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?


In response to


pgsql-patches by date

Next:From: Ed L.Date: 2004-08-27 21:48:21
Subject: Re: log_filename_prefix --> log_filename + strftime()
Previous:From: Joe ConwayDate: 2004-08-27 20:37:57
Subject: Re: [SQL] array_in: '{}}'::text[]

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group