From: Alexey Klyukin <alexk@commandprompt.com>
To: Vladimir Rusinov <vladimir@greenmice.info>
Cc: pgsql-admin@postgresql.org
Subject: Re: log_min_duration_statement log parsing
Date: Mon, 31 Mar 2008 15:19:34 +0300
Message-ID: <20080331121934.GA7007@vollmond> (raw)
In-Reply-To: <f6fdfb550803310506r4fea74ecre3018158529fefff@mail.gmail.com>
References: <f6fdfb550803310506r4fea74ecre3018158529fefff@mail.gmail.com>
Vladimir Rusinov wrote:
> Hello!
>
> I need a daily list of log-running statements. I've turned on
> log_min_duraion_statement and going to write script which would daily parse
> postgresql log and mail it to me, but I have no long-running statements (and
> don't wanna do specially) and I can't see any in my log file. How does they
> look?
Just set log_min_duration to 0, according to the manual it would print
all statement duration so you can see how it looks on your system.
>
> And may be someone have such script or other ideas how to log long-running
> statements in order to optimize them?
I suggest you to take a look at pgFouine:
http://pgfouine.projects.postgresql.org/
--
Alexey Klyukin http://www.commandprompt.com/
The PostgreSQL Company - Command Prompt, Inc.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: alexk@commandprompt.com, vladimir@greenmice.info
Subject: Re: log_min_duration_statement log parsing
In-Reply-To: <20080331121934.GA7007@vollmond>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox