Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B81549FA5F7 for ; Tue, 17 Apr 2007 15:29:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 72831-02 for ; Tue, 17 Apr 2007 15:29:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id BD5D49FA5E5 for ; Tue, 17 Apr 2007 15:29:20 -0300 (ADT) thread-index: AceBHlljfucMg9HLTe6NnYnHyA+3ZQ== Received: from [192.168.0.22] ([85.211.22.118]) by mail01.enterprisedb.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 17 Apr 2007 14:29:34 -0400 Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2826 Subject: Re: log_autovacuum From: "Simon Riggs" To: "Alvaro Herrera" Cc: In-Reply-To: <20070417180633.GA15495@alvh.no-ip.org> References: <1173369949.3641.132.camel@silverbirch.site> <20070308175330.GW4715@alvh.no-ip.org> <1173378696.3641.162.camel@silverbirch.site> <20070417180633.GA15495@alvh.no-ip.org> Content-Type: text/plain; charset="iso-8859-1" Date: Tue, 17 Apr 2007 19:25:14 +0100 Message-ID: <1176834315.3635.414.camel@silverbirch.site> MIME-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 17 Apr 2007 18:29:34.0890 (UTC) FILETIME=[593388A0:01C7811E] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/407 X-Sequence-Number: 1974 On Tue, 2007-04-17 at 14:06 -0400, Alvaro Herrera wrote: > Simon Riggs wrote: > > On Thu, 2007-03-08 at 14:53 -0300, Alvaro Herrera wrote: > > > Maybe something like this is better: > > > > > > LOG: index passes: 1 pages: removed 0, 197 remain tuples: removed 7199, 2338 remain CPU usage: whatever > > > CONTEXT: Automatic vacuuming of table "database.public.w" > > > > Yours is better. > > > > I've implemented this: > > > > LOG: autovac "public.w" index passes: 1 pages: removed 0, 197 remain > > tuples: removed 7199, 2338 remain CPU usage: whatever > > > > I'm happy if this gets removed later, but I think it will help everybody > > understand how multi-vacuums are working and what the best way to > > specify the controls should be. > > > > Not sure about the CONTEXT bit. I think its verbose, plus I thought that > > was for ERRORs only. I will defer on this point, since I know y'all > > understand that better than I. > > I've tinkered with this patch a bit. Sample output: > > LOG: automatic vacuum of table "alvherre.public.foo": index scans: 0 > pages: removed 0, 11226 remain > tuples: 1300683 removed, 1096236 remain > system usage: CPU 0.29s/0.38u sec elapsed 2.56 sec > > Please comment. Well, 'tis great except when you have very very frequent autovacuums. That was why I wanted it in 1 log line. Perhaps we need this as an integer, so we can log all vacuums that last for longer in seconds than the setting, 0 logs all. That would significantly reduce the volume if we set it to 5, say. That way you would get your readability and I would get my reasonable size logs. I guess we need to see how this interacts with HOT, as well. Presumably you mean to have both removeds in the same order? > pages: 0 removed, 11226 remain > tuples: 1300683 removed, 1096236 remain -- Simon Riggs EnterpriseDB http://www.enterprisedb.com