Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 502F29FB5C7 for ; Tue, 17 Apr 2007 16:06:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 16924-08 for ; Tue, 17 Apr 2007 16:06:04 -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 648FB9FB2BA for ; Tue, 17 Apr 2007 16:06:06 -0300 (ADT) thread-index: AceBI3wD8EDssVUWSuefCv4WVrOfkw== 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 15:06:19 -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: <20070417184550.GC15495@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> <1176834315.3635.414.camel@silverbirch.site> <20070417184550.GC15495@alvh.no-ip.org> Content-Type: text/plain; charset="iso-8859-1" Date: Tue, 17 Apr 2007 20:01:57 +0100 Message-ID: <1176836518.3635.440.camel@silverbirch.site> MIME-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 17 Apr 2007 19:06:20.0062 (UTC) FILETIME=[7B9613E0:01C78123] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/413 X-Sequence-Number: 1980 On Tue, 2007-04-17 at 14:45 -0400, Alvaro Herrera wrote: > Simon Riggs wrote: > > On Tue, 2007-04-17 at 14:06 -0400, Alvaro Herrera wrote: > > > > 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. > > It kinda smells funny to have a setting like that. Do we have a > precedent? If other people is OK with it, I'll do that. log_temp_files works a bit like that, as does log_min_duration_statement perhaps log_min_duration_vacuum? that would be easier to understand > Would it work to add a separate GUC var to control the minimum autovac > time? Also, why do it by time and not by amount of tuples/pages > removed? ...because you only want to know about slow vacuums. Time is a more natural unit than tuples removed. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com