From: John Rouillard <rouilj@renesys.com>
To: Charles Sprickman <spork@biglist.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: logging full queries separately
Date: Mon, 25 Feb 2013 14:59:38 +0000
Message-ID: <20130225145938.GL7039@renesys.com> (raw)
In-Reply-To: <E2C417D4-A5C0-474C-8831-027A5E87C0A8@biglist.com>
References: <E2C417D4-A5C0-474C-8831-027A5E87C0A8@biglist.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
On Sat, Feb 23, 2013 at 12:55:07AM -0500, Charles Sprickman wrote:
>[...]
>The one huge downside to this is that the logs are so noisy, it's
>hard to track down errors and stats real-time since the query logging
>is so noisy.
> [...]
>Right now I'm considering just switching to syslog-ng or rsyslog
>and seeing if there's a way I can parse the non-query messages
>out and dump them in another logfile… Any pointers on that?
I use SEC for log analysis and I identify query logs by looking for
the duration entry in the first line. Then pull the triplet of:
hostname, pid and log line id (the 5 in [5-2], [5-3] etc.)
and find all the rest of the lines by matching that triplet.
>Without breaking compatibility with pgbadger, what
>log_line_prefix might make it easier to pick out
>statements (even when they span multiple lines)?
Just for reference I use:
'%t %u@%d(%p): '
--
-- rouilj
John Rouillard System Administrator
Renesys Corporation 603-244-9084 (cell) 603-643-9300 x 111
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: rouilj@renesys.com, spork@biglist.com
Subject: Re: logging full queries separately
In-Reply-To: <20130225145938.GL7039@renesys.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox