Re: Table space grow big - PostgreSQL - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: Table space grow big - PostgreSQL
Date
Msg-id 4BE1336A02000025000312CE@gw.wicourts.gov
Whole thread Raw
In response to Re: Table space grow big - PostgreSQL  (Khangelani Gama <Khangelani.Gama@ucs-software.co.za>)
Responses Re: Table space grow big - PostgreSQL  (Khangelani Gama <Khangelani.Gama@ucs-software.co.za>)
List pgsql-admin
Khangelani Gama <Khangelani.Gama@ucs-software.co.za> wrote:

> There is a script that runs once a month

Most likely that should be daily, or at least weekly.

> "REINDEX TABLE ${table}"
> "VACUUM FULL VERBOSE ${table}"
> "VACUUM ANALYZE ${table}"

That's the wrong order.  Try:

"VACUUM FULL VERBOSE ANALYZE ${table}"
"REINDEX TABLE ${table}"

With your current order, the VACUUM FULL bloats the indexes you've
just rebuilt.

If you vacuum frequently enough, you should not need to use the FULL
option.

> Dumping and restoring the database doesn't decrease the space

Now, that's odd.  You're not restoring back into the same database
without dropping it first (using the "clean" option), are you?
Perhaps you have some very wide indexes, or a very large number of
small tables?

> There is nothing set in the postgresql.conf file that has to do
> with vacuum analyze.

Well, that wasn't the only thing I would look for; however, I'm not
sure how many of the things I usually check exist in 7.3 or work the
same way.  :-(

-Kevin

pgsql-admin by date:

Previous
From: Ian Lea
Date:
Subject: Re: Table space grow big - PostgreSQL
Next
From: raghu ram
Date:
Subject: PITR backup & Restore issue