Re: Postgresql Logging

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Ericson Smith <eric(at)did-it(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgresql Logging
Date: 2004-05-26 18:46:01
Message-ID: 200405261846.i4QIk1Z01523@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ericson Smith wrote:
> Hi,
>
> Currently we are logging SQL statements for profiling purposes. We now
> get something like this:
>
> 2004-05-26 13:27:51 [30017] LOG: statement: SELECT * FROM cache_62
> WHERE key='6832271710644150012240e7153b6f62'
> 2004-05-26 13:27:51 [30017] LOG: duration: 0.733 ms
>
> Is there a way to get the duration into the statement line as well?
> Sometimes the logging overlaps, so its difficult to decide which
> duration applies to which statement, even though the have the PID in there.

Sure, set log_min_duration_statement to 0. That is new in 7.4.

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Bjorklund 2004-05-26 19:03:56 Re: performance very slow
Previous Message Ericson Smith 2004-05-26 18:30:26 Postgresql Logging