Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 0BED764FE47 for ; Mon, 17 Nov 2008 11:45:54 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 85843-05 for ; Mon, 17 Nov 2008 11:45:49 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from cluster-e.mailcontrol.com (cluster-e.mailcontrol.com [217.79.216.190]) by mail.postgresql.org (Postfix) with ESMTP id 8FC0964FD92 for ; Mon, 17 Nov 2008 11:45:48 -0400 (AST) Received: from rly61e.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly61e.srv.mailcontrol.com (MailControl) with ESMTP id mAHFJ59Q014688 for ; Mon, 17 Nov 2008 15:19:05 GMT Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly61e.srv.mailcontrol.com (MailControl) id mAHFIn91012767 for pgsql-admin@postgresql.org; Mon, 17 Nov 2008 15:18:49 GMT Received: from jupiter.egsgroup.com (jupiter.egsgroup.com [195.224.231.134]) by rly61e-eth0.srv.mailcontrol.com (envelope-sender ben.webber@egsgroup.com) (MIMEDefang) with ESMTP id mAHFInLa012741; Mon, 17 Nov 2008 15:18:49 +0000 (GMT) Received: by jupiter.egsgroup.com (Postfix, from userid 65) id 85AFF70E4; Mon, 17 Nov 2008 15:18:49 +0000 (GMT) X-Scanned-By: MailControl A_08_51_00 (www.mailcontrol.com) on 10.69.1.171 X-Scanned-By: AMaViS-ng at egsgroup.com Received: from [10.20.0.124] (unknown [83.217.119.102]) by jupiter.egsgroup.com (Postfix) with ESMTP id 99AB4AF; Mon, 17 Nov 2008 15:18:48 +0000 (GMT) Message-ID: <49218B60.70409@egsgroup.com> Date: Mon, 17 Nov 2008 15:18:56 +0000 From: Ben Webber User-Agent: Thunderbird 2.0.0.17 (X11/20081109) MIME-Version: 1.0 To: Alvaro Herrera Cc: pgsql-admin@postgresql.org, Alexander Stanier Subject: Re: Change in logging behaviour between 8.1 and 8.2 References: <4901E4ED.7090301@egsgroup.com> <6092.1224892561@sss.pgh.pa.us> <49217587.4030709@egsgroup.com> <20081117145837.GG4291@alvh.no-ip.org> In-Reply-To: <20081117145837.GG4291@alvh.no-ip.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200811/90 X-Sequence-Number: 30744 An interesting suggestion, but the problem with storing the logfiles in a table for us would be that uncompressed, the log file for a day is about 10 gigs. This would mean that an unacceptable amount of excess data would accumulate in the database. It would be feasible however to write a script to import the archived logfile into a new temporary database on a different server, then use SQL to search it and delete the db when finished. Thanks for the suggestion though. Ben. Alvaro Herrera wrote: > Ben Webber wrote: >> Hi, >> >> I wrote a shell script to find the duration and the related statement in the log file and place them one after the other if the duration is over a specified time like this:- >> >> 2008-10-31 02:00:49 GMT [23683] [mp_live] LOG: statement: CLUSTER; >> 2008-10-31 02:04:42 GMT [23683] [mp_live] LOG: duration: 232783.684 ms > > I wonder if you'd benefit from doing CSV logs and then storing them into > a table. Querying using SQL is probably going to be easier (and more > robust -- it'd work even with embedded newlines etc). > This message has been scanned for malware by SurfControl plc. www.surfcontrol.com