Skip site navigation (1) Skip section navigation (2)

Re: Reporting query duration

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reporting query duration
Date: 2002-08-30 16:14:15
Message-ID: 200208301614.g7UGEGU15466@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> >> 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.
> 
> Sure.
> 
> > Do we auto-enable pid output when we enable duration?  Yuck.
> 
> No, you expect the user to select the options he needs.  Let's not
> over-engineer a perfectly simple feature.

OK, so I will rename debug_print_query to log_print_query, and Gavin's
new print query on error will also be a log_*.

I will add a new GUC variable to print the query duration, and recommend
in the docs that log_pid be enabled at the same time so you can match
the duration with the query.

Originally, I wanted to make the time just print whenever you enabled
print_query, but with them on separate lines, it should be a separate
GUC variable.

-- 
  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: Bruce MomjianDate: 2002-08-30 16:18:36
Subject: Re: make failure on cvs tip
Previous:From: Tom LaneDate: 2002-08-30 16:06:25
Subject: Re: contrib features during beta period

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group