How do I vacuum safely? And how often should I reindex a table?

From: marc(at)oscar(dot)eng(dot)cv(dot)net (Marc Spitzer)
To: pgsql-admin(at)postgresql(dot)org
Subject: How do I vacuum safely? And how often should I reindex a table?
Date: 2001-12-17 17:25:05
Message-ID: slrna1sahp.2292.marc@oscar.eng.cv.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello all,

If any of these are answered in the docs please RTFM me
with a pointer.

I have some questions about vaccum analize, and here they are:

1: to vaccume analize a db I just vaccume analize the tables
one at a time

2: no reads or writes happen durring the vacuum

3: does vacuum wait to aquire the lock or just fail, is
it nessarsary to get the lock programaticly and then
turn it loos oe will it take care of it self.

4: is there any way to figure out how much wasted space
there is in a table, the number of rows marked as
garbage would be enough.

now on to my index/primary key questions

1: how do I figure out how much space is wasted in my indexs
and primary keys? Now I just keep an eye on disk usage,
is there a better way?

2: how often should I reindex my db, are there any standards
or accepted practices out there

and how will 7.2 be different, I remember a background vacuum
being discused, what other great things are there waiting in
the wings

Thanks

marc

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Sanjay Bhatia 2001-12-18 00:15:57 Resetting connection errors and incomplete restores.
Previous Message Andrew G. Hammond 2001-12-17 08:59:22 Re: All users can enter as one user "puser" without