Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 3D34663252F for ; Mon, 16 Aug 2010 15:35:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 90479-01 for ; Mon, 16 Aug 2010 18:35:18 +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 B92B4632C5C for ; Mon, 16 Aug 2010 15:35:17 -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 o7GIZG7p019037; Mon, 16 Aug 2010 14:35:16 -0400 (EDT) To: Peter Koczan cc: pgsql-admin@postgresql.org Subject: Re: Is regular vacuuming with autovacuum needed? In-reply-to: References: Comments: In-reply-to Peter Koczan message dated "Mon, 16 Aug 2010 13:08:31 -0500" Date: Mon, 16 Aug 2010 14:35:16 -0400 Message-ID: <19036.1281983716@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/120 X-Sequence-Number: 35369 Peter Koczan writes: > The issue was that a routine VACUUM process (vacuumdb -az, called > nightly via cron) was locking a table and wasn't completing. This > server is also running autovacuum. This wasn't the source of the > deadlock, but I'm wondering if regular vacuuming is necessary or even > desirable with autovacuum running. Is there any reason for me to not > disable the vacuum cron job and just tweak autovacuum parameters (or > even just to leave the defaults)? 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. regards, tom lane