pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
log_min_duration_statement log parsing
3+ messages / 2 participants
[nested] [flat]

* log_min_duration_statement log parsing
@ 2008-03-31 12:06  Vladimir Rusinov <vladimir@greenmice.info>
  0 siblings, 1 reply; 3+ messages in thread

From: Vladimir Rusinov @ 2008-03-31 12:06 UTC (permalink / raw)
  To: pgsql-admin

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?

And may be someone have such script or other ideas how to log long-running
statements in order to optimize them?

-- 
Vladimir Rusinov
Voronezh, Russia
UNIX Admin @ Murano Software

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: log_min_duration_statement log parsing
@ 2008-03-31 12:19  Alexey Klyukin <alexk@commandprompt.com>
  parent: Vladimir Rusinov <vladimir@greenmice.info>
  0 siblings, 1 reply; 3+ messages in thread

From: Alexey Klyukin @ 2008-03-31 12:19 UTC (permalink / raw)
  To: Vladimir Rusinov <vladimir@greenmice.info>; +Cc: pgsql-admin

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.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: log_min_duration_statement log parsing
@ 2008-03-31 13:05  Vladimir Rusinov <vladimir@greenmice.info>
  parent: Alexey Klyukin <alexk@commandprompt.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Vladimir Rusinov @ 2008-03-31 13:05 UTC (permalink / raw)
  To: Vladimir Rusinov <vladimir@greenmice.info>; pgsql-admin

On Mon, Mar 31, 2008 at 4:19 PM, Alexey Klyukin <alexk@commandprompt.com>
wrote:

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


Yes, according to description it is actually what we need.
Thanks a lot!

(Next time I should google before asking questions, sorry)

-- 
Vladimir Rusinov
Voronezh, Russia
UNIX Admin @ Murano Software

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2008-03-31 13:05 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-03-31 12:06 log_min_duration_statement log parsing Vladimir Rusinov <vladimir@greenmice.info>
2008-03-31 12:19 ` Alexey Klyukin <alexk@commandprompt.com>
2008-03-31 13:05   ` Vladimir Rusinov <vladimir@greenmice.info>

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