Re: the right time to vacuum database?

From: Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info>
To: "Charles(dot)Hou" <ivan(dot)hou(at)msa(dot)hinet(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: the right time to vacuum database?
Date: 2007-06-06 13:57:44
Message-ID: 1181138264.27654.105.camel@dba5.int.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

On Tue, 2007-06-05 at 16:59 -0700, Charles.Hou wrote:
> On 6 5 , 9 12 , bnich(dot)(dot)(dot)(at)ca(dot)afilias(dot)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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Erwin Brandstetter 2007-06-06 13:59:48 Change order of table-columns in pg_catalog.pg_attribute.attnum
Previous Message Bruce Momjian 2007-06-06 03:51:31 Re: about threaded libpq

Browse pgsql-sql by date

  From Date Subject
Next Message Osvaldo Rosario Kussama 2007-06-06 15:54:52 Re: current_date / datetime stuff
Previous Message Loredana Curugiu 2007-06-06 12:47:02 Re: JOIN