Unix Technical Forum

log_min_duration_statement log parsing

This is a discussion on log_min_duration_statement log parsing within the pgsql Admins forums, part of the PostgreSQL category; --> Hello! I need a daily list of log-running statements. I've turned on log_min_duraion_statement and going to write script which ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 08:20 AM
Vladimir Rusinov
 
Posts: n/a
Default log_min_duration_statement log parsing

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 08:20 AM
Alexey Klyukin
 
Posts: n/a
Default Re: log_min_duration_statement log parsing

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.

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:29 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com