Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id AC2B49FB6F5 for ; Wed, 6 Jun 2007 10:58:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 61664-09 for ; Wed, 6 Jun 2007 10:57:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail.libertyrms.com (vgateway.libertyrms.info [207.219.45.62]) by postgresql.org (Postfix) with ESMTP id 3CFD19FB6BA for ; Wed, 6 Jun 2007 10:57:49 -0300 (ADT) Received: from dba5.int.libertyrms.com ([10.1.3.44]) by mail.libertyrms.com with esmtp (Exim 4.22) id 1Hvw1A-0008HQ-Lg; Wed, 06 Jun 2007 09:57:44 -0400 Subject: Re: the right time to vacuum database? From: Brad Nicholson To: "Charles.Hou" Cc: pgsql-admin@postgresql.org In-Reply-To: <1181087961.969587.237660@g37g2000prf.googlegroups.com> References: <1181039589.643323.59660@r19g2000prf.googlegroups.com> <1181049167.27654.55.camel@dba5.int.libertyrms.com> <1181087961.969587.237660@g37g2000prf.googlegroups.com> Content-Type: text/plain Date: Wed, 06 Jun 2007 09:57:44 -0400 Message-Id: <1181138264.27654.105.camel@dba5.int.libertyrms.com> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-SA-Exim-Mail-From: bnichols@ca.afilias.info X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.266 tagged_above=0 required=5 tests=AWL=0.130, BAYES_50=0.001, FORGED_RCVD_HELO=0.135 X-Spam-Level: X-Archive-Number: 200706/37 X-Sequence-Number: 25705 On Tue, 2007-06-05 at 16:59 -0700, Charles.Hou wrote: > On 6 5 , 9 12 , bnich...@ca.afilias.info (Brad Nicholson) wrote: > > On Tue, 2007-06-05 at 03:33 -0700, Charles.Hou wrote: > > > how can i know that it's the time to vacuumdb? i set the crontab to > > > vacuumdb 3 times in one day. because my database size increase from > > > 440MB to 460MB in 8 hours. > > > > Have you looked at autovaccum? It can handle this for you. > > > > If not, you need to examine the output of VACUUM VERBOSE or pg_stattuple > > (in contrib) and set a policy based on the output. > > > > It's entirely possible that some tables will need to get vacuumed > > frequently, and others will not. > > > > -- > > Brad Nicholson 416-673-4106 > > Database Administrator, Afilias Canada Corp. > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 3: Have you checked our extensive FAQ? > > > > http://www.postgresql.org/docs/faq > > where is the contrib directory? i can't find it. If you built your own binaries from source, there is a directory called contrib under the root of your source tree. You'll need to build the modules. If you installed a package, you'll probably need to grab a contrib package for your version as well (I'm not overly familiar with the pre-packaged binaries). Look in the following directory for your binaries: /path_to_postgres/doc/contrib If the contrib stuff is installed, you'll find the appropriate docs there. -- Brad Nicholson 416-673-4106 Database Administrator, Afilias Canada Corp.