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 200408302307.24747.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()
Re: log_filename_prefix --> log_filename + strftime()
List pgsql-patches
On Monday August 30 2004 10:56, Tom Lane wrote:
> "Ed L." <pgsql@bluepolka.net> writes:
> >
> > Attached is a revised patch:
>
> Applied with minor revisions.
>
> > I did not add UTC offset logic nor logic to shift to top of the
> > hour/day for rotation periods of 60/1440 minutes, but would like to add
> > that shortly if time permits.
>
> I did the latter but not the former -- ie, rotation target times are
> rounded off, but rounded with respect to GMT not local time.  I didn't
> see an obviously correct behavior of round-to-local-time across DST
> transitions ...

One idea for handling the round-to-localtime issue from the other end of the
problem:  optionally rotate logs upon an *interpolated* filename change.
Then, 'server_log.%a' would cause a rotation when strftime() thinks it's
midnight local, 'server_log.%H' would rotate at the top of the hour, etc.
Possibly a half-baked idea.

I also noticed pg_tm.tm_gmtoff is apparently not set, at least not for my
local (US MT).

Ed


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: log_filename_prefix --> log_filename + strftime()
Next
From: Tom Lane
Date:
Subject: Re: log_filename_prefix --> log_filename + strftime()