Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U9zWp-0004i4-87 for pgsql-admin@arkaria.postgresql.org; Mon, 25 Feb 2013 14:59:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U9zWo-0000ph-K3 for pgsql-admin@arkaria.postgresql.org; Mon, 25 Feb 2013 14:59:42 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U9zWn-0000pZ-G4 for pgsql-admin@postgresql.org; Mon, 25 Feb 2013 14:59:41 +0000 Received: from mailhub1.ep.renesys.com ([195.160.236.248]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U9zWl-0001DP-LX for pgsql-admin@postgresql.org; Mon, 25 Feb 2013 14:59:40 +0000 Received: from ops05.psm1.renesys.com (ops05.psm1.renesys.com [10.200.1.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailhub1.ep.renesys.com (Postfix) with ESMTP id A143E67175; Mon, 25 Feb 2013 14:59:38 +0000 (UTC) Received: (from rouilj@localhost) by ops05.psm1.renesys.com (8.13.8/8.13.8/Submit) id r1PExcDI005272; Mon, 25 Feb 2013 14:59:38 GMT Date: Mon, 25 Feb 2013 14:59:38 +0000 From: John Rouillard To: Charles Sprickman Cc: pgsql-admin@postgresql.org Subject: Re: logging full queries separately Message-ID: <20130225145938.GL7039@renesys.com> 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-06-14) 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: >[...] >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=E2=80=A6 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): ' --=20 -- rouilj John Rouillard System Administrator Renesys Corporation 603-244-9084 (cell) 603-643-9300 x 111 --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin