pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ktm@rice.edu <ktm@rice.edu>
To: Charles Sprickman <spork@biglist.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: logging full queries separately
Date: Sat, 23 Feb 2013 10:35:28 -0600
Message-ID: <20130223163528.GB19991@aart.rice.edu> (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:
> Howdy,
> 
> I've been finding that keeping full query logs is quite helpful; I started doing this to be able to run pgbadger each day to get a nice overview of what's going on with the db servers.  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.
> 
> Looking at the manual, I don't see any creative solutions to split the query logs off from the rest of the logs.  Is there anything I've overlooked to take care of this?
> 
> 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?  Without breaking compatibility with pgbadger, what log_line_prefix might make it easier to pick out statements (even when they span multiple lines)?
> 
> Thanks,
> 
> Charles
> 

Hi Charles,

Using syslog will work well for this. I would definitely recommend rsyslog
over syslog-ng. We have a system running both and rsyslog is more efficient
with less overhead and is less costly than syslog-ng for some functionality.

Regards,
Ken


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



view thread (5+ messages)  latest in thread

Message-ID: <20130223163528.GB19991@aart.rice.edu>
Permalink:  ../20130223163528.GB19991@aart.rice.edu/
Also on:    postgresql.org/message-id/20130223163528.GB19991@aart.rice.edu

 · 

reply

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: ktm@rice.edu, spork@biglist.com
  Subject: Re: logging full queries separately
  In-Reply-To: <20130223163528.GB19991@aart.rice.edu>

* 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