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

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: (view raw, whole thread or download thread mbox)
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                        |
  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

pgsql-patches by date

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

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