Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 42F5D632BC8 for ; Mon, 16 Aug 2010 17:01:36 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 31178-01 for ; Mon, 16 Aug 2010 20:01:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 27EF963223B for ; Mon, 16 Aug 2010 17:01:29 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o7GK1O98020666; Mon, 16 Aug 2010 16:01:24 -0400 (EDT) To: Greg Smith cc: Peter Koczan , pgsql-admin@postgresql.org Subject: Re: Is regular vacuuming with autovacuum needed? In-reply-to: <4C6996CB.9090808@2ndquadrant.com> References: <19036.1281983716@sss.pgh.pa.us> <4C6996CB.9090808@2ndquadrant.com> Comments: In-reply-to Greg Smith message dated "Mon, 16 Aug 2010 15:51:39 -0400" Date: Mon, 16 Aug 2010 16:01:24 -0400 Message-ID: <20665.1281988884@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/122 X-Sequence-Number: 35371 Greg Smith writes: > Tom Lane wrote: >> On versions where autovacuum is on by default, I would certainly >> recommend trying to use only autovacuum. cron-driven vacuum still >> has some uses but they are corner cases. > Corner cases implies something a bit more rare than I'd consider the > case here. Well, it certainly has some uses, but I still think it's good advice to first see if autovac alone will keep you happy. > The other alternative here is to just tune autovacuum so it runs really > slowly, so it won't kill responsiveness during any peak period. While > in theory that's the right thing to do, this is much harder to get > working well than what I just described. But you really have to do that *anyway*, if you're not going to turn autovac off. I think the case where you want to combine cron-driven vacuum with autovac is where, having made sure autovac is dialed down enough to not present performance issues, you find that it can't keep up with the required vacuuming. Then you need to do some not-hobbled vacuuming during your maintenance windows. Eventually probably autovac will have some understanding of maintenance windows built-in, but it doesn't yet. regards, tom lane