Re: A single escape required for log_filename

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: A single escape required for log_filename
Дата
Msg-id 7568.1231903433@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: A single escape required for log_filename  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: A single escape required for log_filename  ("Robert Haas" <robertmhaas@gmail.com>)
Re: A single escape required for log_filename  (Peter Eisentraut <peter_e@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Documenting pglesslog
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: per-database locale: createdb switches