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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-08-30 16:18:36 Re: make failure on cvs tip
Previous Message Tom Lane 2002-08-30 16:06:25 Re: contrib features during beta period