Re: When does VACUUM FULL not clean out all deleted data? - Mailing list pgsql-admin

From Scott Marlowe
Subject Re: When does VACUUM FULL not clean out all deleted data?
Date
Msg-id dcc563d10801040902t15784c38vff8c91e3b9207a9c@mail.gmail.com
Whole thread Raw
In response to Re: When does VACUUM FULL not clean out all deleted data?  (James Cloos <cloos@jhcloos.com>)
Responses Re: When does VACUUM FULL not clean out all deleted data?  (James Cloos <cloos@jhcloos.com>)
Re: When does VACUUM FULL not clean out all deleted data?  (Geoffrey <lists@serioustechnology.com>)
List pgsql-admin
On Jan 4, 2008 9:35 AM, James Cloos <cloos@jhcloos.com> wrote:
> >>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>
> >> Why was the db using that extra five plus gigs?
>
> Tom> Smells like a hadn't-been-vacuuming-often-enough problem.
>
> Sorry, I forgot to mention:  autovacuum was enabled and I also ran
> this script every night via cron:
>
> #!/bin/bash
> FULL=''
> test $(date +%w) -eq 0 && FULL='FULL'
> exec psql -U dbm -c "VACUUM ${FULL} VERBOSE ANALYZE" dbm

Note that routine vacuum FULL is not a good idea actually.  vacuum
full is something you run when things have gone wrong (i.e. not enough
regular vacuuming) and it is usually best followed by reindexing all
your indexes.

It's far better to keep track of bloat and run vacuum full, if at all,
by hand, and only when needed.  Running it regularly with no
reindexing often results in index bloat which makes the database
slower not faster.

pgsql-admin by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Postgres 7.4 VACUUM FULL multiple AccessExclusiveLocks?
Next
From: Chris Ruprecht
Date:
Subject: Re: MacOS X 10.5.1 and compiling for multiple Architectures