Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 709679FB311 for ; Tue, 17 Apr 2007 15:59:23 -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 16093-01 for ; Tue, 17 Apr 2007 15:59:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 535919FA5E5 for ; Tue, 17 Apr 2007 15:59:20 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l3HIxGUo004687; Tue, 17 Apr 2007 14:59:17 -0400 (EDT) To: Alvaro Herrera cc: Simon Riggs , pgsql-patches@postgresql.org Subject: Re: log_autovacuum 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> Comments: In-reply-to Alvaro Herrera message dated "Tue, 17 Apr 2007 14:45:50 -0400" Date: Tue, 17 Apr 2007 14:59:16 -0400 Message-ID: <4686.1176836356@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/411 X-Sequence-Number: 1978 Alvaro Herrera writes: > Simon Riggs wrote: >> 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. Sure, log_min_duration_statement. Applying the same concept to autovac logging makes sense to me. In fact, what you've got now is equivalent to an unconditional log_statement boolean, which is about where we were three or four releases ago on statement logging. History suggests that we'd soon want it to be more flexible than that. It seems sane to me to skip the boolean stage and go straight to a threshold parameter. > Also, why do it by time and not by amount of tuples/pages removed? One, it's consistent with the way we do thresholded statement logging. Two, time is a better indicator of effort expended --- consider vacuuming a very large table that has only a few dead tuples. We might want to add logging thresholds for pages/tuples later, but for now I'd vote for just one parameter: a time threshold. regards, tom lane