Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 55AFA650094 for ; Mon, 17 Nov 2008 11:24:20 -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 82262-02 for ; Mon, 17 Nov 2008 11:24:16 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from cluster-j.mailcontrol.com (cluster-j.mailcontrol.com [86.111.223.190]) by mail.postgresql.org (Postfix) with ESMTP id C819E64FD92 for ; Mon, 17 Nov 2008 11:24:16 -0400 (AST) Received: from rly51j.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly51j.srv.mailcontrol.com (MailControl) with ESMTP id mAHFOEff005690 for ; Mon, 17 Nov 2008 15:24:14 GMT Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly51j.srv.mailcontrol.com (MailControl) id mAHFNr2J005083 for pgsql-admin@postgresql.org; Mon, 17 Nov 2008 15:23:53 GMT Received: from jupiter.egsgroup.com (jupiter.egsgroup.com [195.224.231.134]) by rly51j-eth0.srv.mailcontrol.com (envelope-sender ben.webber@egsgroup.com) (MIMEDefang) with ESMTP id mAHFNq9M004934; Mon, 17 Nov 2008 15:23:53 +0000 (GMT) Received: by jupiter.egsgroup.com (Postfix, from userid 65) id B8BE470E4; Mon, 17 Nov 2008 15:23:52 +0000 (GMT) X-Scanned-By: MailControl A_08_51_00 (www.mailcontrol.com) on 10.74.1.161 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 C7F46AF; Mon, 17 Nov 2008 15:23:51 +0000 (GMT) Message-ID: <49218C90.40804@egsgroup.com> Date: Mon, 17 Nov 2008 15:24:00 +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/88 X-Sequence-Number: 30742 Sorry, meant 2 gigs, not 10. 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