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"
In response to
pgsql-patches by date
|Next:||From: Pavan Deolasee||Date: 2007-08-02 06:53:26|
|Subject: Re: HOT patch - version 11|
|Previous:||From: Andrew Dunstan||Date: 2007-08-01 23:57:03|
|Subject: Re: enable logging of start time/cookie for all backend