Re: log_duration

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: log_duration
Date: 2003-02-11 04:33:05
Message-ID: 21893.1044937985@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> Looking at the log_duration postgresql.conf option. How about adding an
> option log_duration_min which is a value in milliseconds that is the minimum
> time a query must run for before being logged.

Fine with me --- but you'll need to add more logic than that. Right
now, log_duration *only* causes the query duration to be printed out;
if you ain't got log_statement on, you're in the dark as to what the
query itself was. You'll need to add some code to print the query
(the log_min_error_statement logic might be a useful source of
inspiration). Not sure how this should interact with the case where
log_duration is set and the min-duration isn't. But maybe that case
is silly, and we should just redefine log_duration as a minimum runtime
that causes the query *and* its runtime to be printed to the log.

regards, tom lane

In response to

  • log_duration at 2003-02-11 03:05:51 from Christopher Kings-Lynne

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Anagh Lal 2003-02-11 04:41:58 Projection while performing joins.
Previous Message greg 2003-02-11 03:57:13 Re: PGP signing releases