Re: A single escape required for log_filename - Mailing list pgsql-hackers

From Tom Lane
Subject Re: A single escape required for log_filename
Date
Msg-id 7568.1231903433@sss.pgh.pa.us
Whole thread Raw
In response to Re: A single escape required for log_filename  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: A single escape required for log_filename
Re: A single escape required for log_filename
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> I'm not sure what postgres does if the filename contains %% as the only 
> escape, although that's would be a fairly ugly hack.

Yes, any %-escape is enough to disable the addition of the timestamp.

Looking back at the archives, I believe the real reason it's like this
is that the original patch supported *only* a fixed filename followed by
numeric timestamp, and that the reason it was that way was that the
patch also included an early version of pg_logdir_ls() that expected the
filenames to be formatted that way.  The current version of pg_logdir_ls
(see contrib/adminpack) has been adjusted to expect filenames built
according to "postgresql-%Y-%m-%d_%H%M%S.log" instead, so maybe the
original rationale is dead.

However, since there's no standard strftime escape for epoch,
Robert's proposal to rip out the functionality would break any existing
code that still depends on this formatting option.  I can't say that
there is any, but by the same token he can't say there isn't.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Documenting pglesslog
Next
From: Bruce Momjian
Date:
Subject: Re: per-database locale: createdb switches