Re: VACUUM not doing its job? - Mailing list pgsql-sql

From Ken Corey
Subject Re: VACUUM not doing its job?
Date
Msg-id 1028412884.28635.22.camel@kenlinux.bithub.org
Whole thread Raw
In response to VACUUM not doing its job?  ("Kristian Eide" <kreide@online.no>)
List pgsql-sql
I've run into this myself.  Tom lane helped me out.

In my case, it was the fact that indexes don't release the space of
indexes of deleted rows.  So, if you have a table that has a lot of
inserts/deletes, your indexes will grow incredibly fast.

The way to see what your biggest items are: 

select * from pg_class order by relpages desc;

If your tables are active with lots of inserts/deletes, the biggest
things will likely be indexes.

The only way that I know to recover this space is to drop the indexes
and recreate them.  Vacuum didn't touch them for me.

-Ken

On Sat, 2002-08-03 at 21:53, Kristian Eide wrote:
> Three week ago we did a pg_dump/pg_restore, and after pgsql/data/ took about
> 750MB. Now it uses 2,4GB of disk space! If we do a new complete dump and
> restore the volume will decrease to about 800MB.





pgsql-sql by date:

Previous
From: "Kristian Eide"
Date:
Subject: Bug with dump/restore when using UNION and ORDER BY in views
Next
From: "Kristian Eide"
Date:
Subject: Re: VACUUM not doing its job?