Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U9I4S-0000kG-9D for pgsql-admin@arkaria.postgresql.org; Sat, 23 Feb 2013 16:35:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U9I4R-0007dp-Mm for pgsql-admin@arkaria.postgresql.org; Sat, 23 Feb 2013 16:35:31 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U9I4Q-0007cU-77 for pgsql-admin@postgresql.org; Sat, 23 Feb 2013 16:35:30 +0000 Received: from mh10.mail.rice.edu ([128.42.201.30]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U9I4O-0000Z6-MC for pgsql-admin@postgresql.org; Sat, 23 Feb 2013 16:35:29 +0000 Received: from mh10.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh10.mail.rice.edu (Postfix) with ESMTP id 34A20604CD; Sat, 23 Feb 2013 10:35:28 -0600 (CST) Received: from mh10.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh10.mail.rice.edu (Postfix) with ESMTP id 3306B604C9; Sat, 23 Feb 2013 10:35:28 -0600 (CST) X-Virus-Scanned: by amavis-2.7.0 at mh10.mail.rice.edu, auth channel Received: from mh10.mail.rice.edu ([127.0.0.1]) by mh10.mail.rice.edu (mh10.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id FjiwK9eTl3DB; Sat, 23 Feb 2013 10:35:28 -0600 (CST) X-SMTP-Auth: no X-SMTP-Auth: no Received: from aart.rice.edu (aart.rice.edu [168.7.56.48]) by mh10.mail.rice.edu (Postfix) with ESMTP id 15726603DB; Sat, 23 Feb 2013 10:35:28 -0600 (CST) Received: by aart.rice.edu (Postfix, from userid 18612) id 0CE411005ED; Sat, 23 Feb 2013 10:35:28 -0600 (CST) Date: Sat, 23 Feb 2013 10:35:28 -0600 From: "ktm@rice.edu" To: Charles Sprickman Cc: pgsql-admin@postgresql.org Subject: Re: logging full queries separately Message-ID: <20130223163528.GB19991@aart.rice.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On Sat, Feb 23, 2013 at 12:55:07AM -0500, Charles Sprickman wrote: > Howdy, >=20 > I've been finding that keeping full query logs is quite helpful; I starte= d 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. >=20 > Looking at the manual, I don't see any creative solutions to split the qu= ery logs off from the rest of the logs. Is there anything I've overlooked = to take care of this? >=20 > Right now I'm considering just switching to syslog-ng or rsyslog and seei= ng if there's a way I can parse the non-query messages out and dump them in= another logfile=E2=80=A6 Any pointers on that? Without breaking compatib= ility with pgbadger, what log_line_prefix might make it easier to pick out = statements (even when they span multiple lines)? >=20 > Thanks, >=20 > Charles >=20 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 --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin