From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Increasing the length of |
Date: | 2004-11-10 21:48:59 |
Message-ID: | 41928CCB.2010206@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Simon Riggs wrote:
> On Mon, 2004-11-08 at 22:32, Tom Lane wrote:
>
>>Another relevant question is why you are expecting to get this
>>information through pgstats and not by looking in the postmaster log.
>
>
> This is only available if you log all queries, which isn't normally done
> while you are in production. When you hit a long running query, you do
> wish you had that enabled, and if it was you could look there.
>
> It would be best to leave the postmaster logging turned off, then allow
> dynamic inspection of the query iff you have a rogue query.
Isn't that:
log_min_duration_statement (integer)
Sets a minimum statement execution time (in milliseconds) for
statement to be logged. All SQL statements that run in the time
specified or longer will be logged with their duration. Setting this to
zero will print all queries and their durations. Minus-one (the default)
disables this. For example, if you set it to 250 then all SQL statements
that run 250ms or longer will be logged. Enabling this option can be
useful in tracking down unoptimized queries in your applications. Only
superusers can increase this or set it to minus-one if this option is
set by the administrator.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2004-11-10 21:52:17 | Re: Increasing the length of |
Previous Message | Simon Riggs | 2004-11-10 21:32:47 | Re: Increasing the length of |