Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 7F7B165014C for ; Mon, 17 Nov 2008 11:33:24 -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 83772-02-2 for ; Mon, 17 Nov 2008 11:33:15 -0400 (AST) X-Greylist: delayed 00:14:03.271022 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 6BA88650188 for ; Mon, 17 Nov 2008 11:33:12 -0400 (AST) Received: from rly38e.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly38e.srv.mailcontrol.com (MailControl) with ESMTP id mAHFWkug019802 for ; Mon, 17 Nov 2008 15:32:46 GMT Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly38e.srv.mailcontrol.com (MailControl) id mAHFVqAB018843 for pgsql-admin@postgresql.org; Mon, 17 Nov 2008 15:31:52 GMT Received: from jupiter.egsgroup.com (jupiter.egsgroup.com [195.224.231.134]) by rly38e-eth0.srv.mailcontrol.com (envelope-sender ben.webber@egsgroup.com) (MIMEDefang) with ESMTP id mAHFVnPe018584; Mon, 17 Nov 2008 15:31:51 +0000 (GMT) Received: by jupiter.egsgroup.com (Postfix, from userid 65) id 371BE70E4; Mon, 17 Nov 2008 15:31:49 +0000 (GMT) X-Scanned-By: MailControl A_08_51_00 (www.mailcontrol.com) on 10.69.1.148 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 44327AF; Mon, 17 Nov 2008 15:31:48 +0000 (GMT) Message-ID: <49218E6C.1060201@egsgroup.com> Date: Mon, 17 Nov 2008 15:31: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> <49218C90.40804@egsgroup.com> In-Reply-To: <49218C90.40804@egsgroup.com> 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/89 X-Sequence-Number: 30743 Arrrghhh, it was was actually 10 (not that it really makes any difference), should have actually waited for file to unzip before posting!!! Ben Webber wrote: > 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 >