Re: Vaccum

From: bangh <banghe(at)baileylink(dot)net>
To: "Leong, Fushan" <fushan(dot)leong(at)SonoSite(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Vaccum
Date: 2001-11-29 19:30:32
Message-ID: 3C068CD7.A9A42AA4@baileylink.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Leong, Fushan" wrote:

> Thanks for everyone input. So let me reply in here to make sure I
> understand it
>
> 1) If I run "vaccum all" or "vaccum tablename", it will just delete the
> expired rows from the file but not free the physical disk space.

Why not? it is the same thing as vacuumdb, the difference is that the function
is called
as different name at different level (or location, in psql, it is vaccum, in
shell, it is vacuumdb.

To Vacuum is not to delete records. Say "free" or "space garbage collection" or
"clear up"
may be better.

> However,
> it will not free the index
> 2) Vaccumdb will delete the expired rows fromt the file and free the
> physical disk space. However, it will not free the index
> 3) For index, you need to run reindex command to stop the grow

Either index or table in a database will grow as long as you don't stop to use
that database. The measure we are talking is a way to avoid wasting of the
space.

Bangh

>
>
> Other than table and index, any object that I should clean up once a while?
>
> Fushan
>
> -----Original Message-----
> From: Stephan Szabo [mailto:sszabo(at)megazone23(dot)bigpanda(dot)com]
> Sent: Thursday, November 29, 2001 10:40 AM
> To: bangh
> Cc: Leong, Fushan; pgsql-admin(at)postgresql(dot)org
> Subject: Re: [ADMIN] Vaccum
>
> On Thu, 29 Nov 2001, bangh wrote:
>
> > HI,
> >
> > This is not necessary true, but you might feel understandable.
> >
> > To delete records, just seems as the records are marked as voided. Space
> is not
> > collected. To run vaccum might do this kind space garbage collection.
> >
> > To run vacummdb really save the space, but it works at only some extent.
> e.g.
> > index still goes quickly, it goes bigger and bigger, one day it eats all
> your
> > space you have, behaves as gets a virus. In this case, my solution is to
> use
> > pg_dump the original one, create new one and restory, this reaaly save
> your
> > space, but you cannot do this as frequently as you do "vacuum". It costs
> much
> > more CPU time to do it if your database is huge.
>
> I think REINDEX or just DROP INDEX/CREATE INDEX should do the same thing
> without requiring the dump/restore.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

In response to

  • Re: Vaccum at 2001-11-29 19:00:22 from Leong, Fushan

Browse pgsql-admin by date

  From Date Subject
Next Message Brian McCane 2001-11-29 20:13:13 Re: Vacuum
Previous Message Leong, Fushan 2001-11-29 19:00:22 Re: Vaccum