Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8D19D9FB6DD for ; Fri, 23 Mar 2007 13:32:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 75188-02-2 for ; Fri, 23 Mar 2007 13:32:42 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 457219FB348 for ; Fri, 23 Mar 2007 13:32:40 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Fri, 23 Mar 2007 16:32:35 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 23 Mar 2007 11:32:35 -0500 Subject: Re: Vacuum full is slow From: Scott Marlowe To: Ruben Rubio Cc: pgsql-performance@postgresql.org In-Reply-To: <45FE6DD4.7080304@rentalia.com> References: <45FE6DD4.7080304@rentalia.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1174667555.10744.2.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Fri, 23 Mar 2007 11:32:35 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/369 X-Sequence-Number: 23774 On Mon, 2007-03-19 at 06:02, Ruben Rubio wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > Vacuum full is very slow for me . I dont know how to speed it up. It > takes between 60 and 90 minutes. > > I have set up autovacuum but I also run vacuum full once per week. Note two things. 1: you need to update your pgsql version. 8.1.3 is a bit old. 2: You shouldn't normally need to run vacuum full. Vacuum full is there to get you out of problems created when regular vacuum falls behind. It contributes to index bloat as well. If routine vacuuming isn't working, regular vacuum full is not the answer (well, 99% of the time it's not). Fixing routing vacuuming is the answer. If you don't have an actual problem with routine vacuuming, you would be better off writing a monitoring script to keep track of bloat in tables and send you an email than running vacuum full all the time.