We currently evaluate PgFouine to analyse all executed statements in a
Postgres 8.4 cluster. But we don't use syslog - instead we use logging
via STDERR. Analyzing of the logs works fine with that combination. We
also tested big logfiles (~ 3GB) with pgFouine - also works fine, but
took about 2h30min for parsing...
 
To do so, we use the following settings in postgresql.conf:
    log_destination = 'stderr'
    logging_collector = on
    log_min_duration_statement = 0
# log EVERY statement in every DB of the cluster
    log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d '  # for pgFouine
Statistics. 
 
after reloading the config (with `pg_ctl reload`) every sql-statement in
every database of the cluster should be logged. To analyze the log with
pgFouine do something like:
 [be...@vmlxdb]$ ./pgfouine.php -file PG84-2009-11-09.log -logtype
stderr -report history

 
If you also need the query-plans in the logfile, then you maybe want to
take a look at the contrib-package 'autoexplain'. This package can write
the query-plan of a sql-statement into the log. But you should be
warned: pgFouine will be a little bit confused with the plans in the
logfile (detect the sql-statement and the associated plan as two
separate statements)...


bernd.


________________________________

        Von: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] Im Auftrag von Chris Barnes
*EXTERN*
        Gesendet: Freitag, 20. November 2009 18:59
        An: Postgres General Postgres General
        Betreff: [GENERAL] Is there a tool used to display statement
times from postgres logs
        
        
        Would someone have a tool that displays statement execution
times/stats from the standard output from postgres logs?
         
        I have attempted pgfouine but not had sucess with the log
format.
         
        Does anyone use pgfouine or have something that works for them?
         
        Chris
        
        
________________________________

        Windows Live: Make it easier for your friends to see what you're
up to on Facebook. <http://go.microsoft.com/?linkid=9691811>  


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

Reply via email to