Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > There is a TODO item:
> > * Allow logging of query durations
> > Currently there is no easy way to get a list of query durations in the
> > server log file. My idea is to add query duration to the end of the
> > query string for 'debug_print_query'. My only problem is that to print
> > the duration, I would have to print the query _after_ it is executed,
> > rather than before.
> Well, that's what makes it a bad idea, eh?
> I think the log entries should be separate: print the query text when
> you start, print the duration when you're done. A little bit of
> postprocessing can reassemble the two entries.
How would someone reassemble them? You would have to have the pid, I
assume. Do we auto-enable pid output when we enable duration? Yuck.
Maybe print the pid just for the query and timing lines if pid print
I would think printing it out together at the end would work. We
already have several ways to see running queries.
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
In response to
pgsql-hackers by date
|Next:||From: Christopher Kings-Lynne||Date: 2002-08-30 04:46:05|
|Subject: contrib features during beta period|
|Previous:||From: Tom Lane||Date: 2002-08-30 04:42:00|
|Subject: Re: @(#)Mordred Labs advisory 0x0007: Remove DoS in PostgreSQL |