Re: Is there a tool used to display statement times from postgres logs

Поиск
Список
Период
Сортировка
От Pinter Bernd
Тема Re: Is there a tool used to display statement times from postgres logs
Дата
Msg-id B7FF1455C90F974C98CD3AA74E27E293041FAE1C@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответ на Is there a tool used to display statement times from postgres logs  (Chris Barnes <compuguruchrisbarnes@hotmail.com>)
Список pgsql-general
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:
 [bernd@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-owner@postgresql.org
[mailto:pgsql-general-owner@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>


В списке pgsql-general по дате отправления:

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: [HACKERS] Updating column on row update
Следующее
От: Jason Armstrong
Дата:
Сообщение: Returning bigint from C extension