From: | Venkata Balaji Nagothi <vbnpgc(at)gmail(dot)com> |
---|---|
To: | Sergey Arlashin <sergeyarl(dot)maillist(at)gmail(dot)com> |
Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: PostgreSQL 9.3 logging: separate log messages |
Date: | 2014-04-01 00:49:50 |
Message-ID: | CAHBAh5t20x-+ewHcuaxZoUrFhuD0FWW4=+BvPMFj+=uLvgWa9w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Tue, Apr 1, 2014 at 12:33 AM, Sergey Arlashin <
sergeyarl(dot)maillist(at)gmail(dot)com> wrote:
Hi!
>
> What is the proper way to separate queries from other messages while
> logging?
>
> For example:
>
> I have 'log_min_duration_statement' parameter in postgresql.conf .
> Therefore I get postgresql system messages and slow queries in one log file
> /var/log/postgresql/postgresql-9.3-main.log .
>
> In order to simplify further reading I'd like to get slow queries in
> /var/log/postgresql/postgresql-slowqueries.log and all the rest in
> /var/log/postgresql/postgresql.log.
>
> I tried to implement this by means of rsyslog but didn't manage to get any
> decent result.
>
AFAIK, there is no such mechanism which would help you log different types
of messages to separate logfiles.
If you like to separate messages in the logfile - you need to either have
an offline process (like perl or shell script) which would help you
identify and separate the types of messages logged and generate two
different logfiles.
In a much simpler way - if your only concern is to log slow queries, then
reporting tools like pgbadger or pg_query_analyzer or pgsi would help you
do so.
Regards,
Venkata Balaji N
Fujitsu Australia
From | Date | Subject | |
---|---|---|---|
Next Message | Murthy Nunna | 2014-04-01 22:17:06 | Cascade Standby Configuration in 9.2.4 |
Previous Message | Adrian Klaver | 2014-03-31 19:21:03 | Re: [ADMIN]openvz and shared memory trouble |