From: | Amit Langote <amitlangote09(at)gmail(dot)com> |
---|---|
To: | Jayadevan M <maymala(dot)jayadevan(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: logging statements in PostgreSQL |
Date: | 2013-09-25 08:13:41 |
Message-ID: | CA+HiwqHNny4LCREy8+NxTis0Q+S8irOgWsTYBPdpWSLPj7jTZA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Sep 25, 2013 at 12:18 PM, Jayadevan M
<maymala(dot)jayadevan(at)gmail(dot)com> wrote:
> Hi all,
> I am planning to use pgbadger for analyzing queries. Documentation for
> pgbadger says "Do not enable log_statement as their log format will not be
> parsed by pgBadger. "
> I have
> log_min_duration_statement = 0
> I do see quite a few SELECTs, INSERTS etc in the log files, function calls
> too, for example.
> select sp_pg_refresh_alert_data(current_date);
> But the SELECT and INSERT in the function are not getting logged. Is that
> how PostgreSQL logging works, or I have missed something?
Have a look at auto_explain module which has configuration parameter:
"auto_explain.log_nested_statements (boolean)"
auto_explain.log_nested_statements causes nested statements
(statements executed inside a function) to be considered for logging.
When it is off, only top-level query plans are logged.
http://www.postgresql.org/docs/devel/static/auto-explain.html
--
Amit Langote
From | Date | Subject | |
---|---|---|---|
Next Message | Jayadevan M | 2013-09-25 08:59:27 | Re: logging statements in PostgreSQL |
Previous Message | François Beausoleil | 2013-09-25 03:19:35 | Deduplication and transaction isolation level |