Re: A single escape required for log_filename

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: A single escape required for log_filename
Date: 2009-01-14 03:23:53
Message-ID: 7568.1231903433@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-01-14 03:27:02 Re: per-database locale: createdb switches
Previous Message Bruce Momjian 2009-01-14 03:15:14 Re: Documenting pglesslog