Re: enable logging of start time/cookie for all backend processes

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: enable logging of start time/cookie for all backend processes
Дата
Msg-id 20070802044131.GA5949@alvh.no-ip.org
обсуждение исходный текст
Ответ на enable logging of start time/cookie for all backend processes  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: enable logging of start time/cookie for all backend processes  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-patches
Andrew Dunstan wrote:
>
> The attached patch makes a very small but useful change to the behaviour of
> log_line_prefix, by enabling the start time (%s) and cookie (%c) logging to
> occur for all backends rather than just for session processes (i.e.
> backends started for a client connection). We actually need almost all of
> this patch, with or without the change in behaviour, so we can put the
> cookie in CSVlogs (which I'm still working on), since the cookie+line
> number make the natural primary key for the logs. The actual change in
> behaviour from this patch comes from the removal of 2 "if (MyProcPort)"
> lines in elog.c. Given that, can I sneak this in or should I wait for 8.4
> given we're long past feature freeze?

Thinking again about the feature itself I wonder if it actually makes
sense -- maybe it does make sense to be able to display the session ID,
but the start time?  Why would anyone care about the start time of
syslogger or bgwriter?  We don't even have a use for the "hey, this
process was started" log line, why would anyone care about having the
start time in the log line prefix?

Actually having the cookie in all processes is another matter, as far as
it's useful for CSV logs.  But then, is it?  Maybe the auxiliary
processes should identify themselves with fixed cookies or something
particular that lets one distinguish, say, a bgwriter from a syslogger,
but is there a case from distinguishing one bgwriter from another?

--
Alvaro Herrera                 http://www.amazon.com/gp/registry/CTMLCN8V17R4
"Amanece.                                               (Ignacio Reyes)
 El Cerro San Cristóbal me mira, cínicamente, con ojos de virgen"

В списке pgsql-patches по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: enable logging of start time/cookie for all backend processes
Следующее
От: "Pavan Deolasee"
Дата:
Сообщение: Re: HOT patch - version 11