GUC changes to log query durations

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: GUC changes to log query durations
Date: 2002-08-31 19:49:03
Message-ID: 200208311949.g7VJn3T24883@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

The attached patch adds 'log_duration' to GUC, showing the duration of
each query. It is to be used with LOG_PID and LOG_STATEMENT:

[22602] LOG: query: SELECT usesuper FROM pg_catalog.pg_user WHERE usename = 'postgres'
[22602] LOG: duration: 0.666637 sec
[22602] LOG: query: SELECT * FROM pg_language;
[22602] LOG: duration: 0.079464 sec

The patch also changes debug_print_query to log_statement and
show_query_statistics to show_statement_statistics. I believe Peter has
suggested similar changes recently, making the debug_print_query a log_
option because it really isn't for debugging the server, and changing
'query' to 'statement' to be more precise.

--
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

Attachment Content-Type Size
unknown_filename text/plain 14.4 KB

Browse pgsql-patches by date

  From Date Subject
Next Message Serguei Mokhov 2002-08-31 20:17:04 pg_resetxlog: Russian NLS
Previous Message Serguei Mokhov 2002-08-31 19:33:49 Re: pg_controldata: Russian NLS