Re: VACUUM FULL vs backup/restore - Mailing list pgsql-general

From Greg Smith
Subject Re: VACUUM FULL vs backup/restore
Date
Msg-id 4BD7BA1A.3030201@2ndquadrant.com
Whole thread Raw
In response to VACUUM FULL vs backup/restore  (David Wall <d.wall@computer.org>)
List pgsql-general
David Wall wrote:
> It seems my options are 1) VACUUM FULL with a reindex_db; or 2)
> backup, then restore.
>
> Is there anything one does better than the other?  Our impression is
> that the backup and restore will run faster (perhaps 2 hours), whereas
> we have a currently running VACUUM FULL that's been running for 4.5
> hours already.

VACUUM FULL can easily run for 4.5 days.  See
http://wiki.postgresql.org/wiki/VACUUM_FULL for a discussion of the
issues here and comments about what you should do instead (probably
CLUSTER if you're running 8.3 or later).  The wiki seems to be having
issues right now so you might need to grab it from a cache somewhere
else instead, i.e.
http://webcache.googleusercontent.com/search?q=cache:fCJXjixyulMJ:wiki.postgresql.org/wiki/VACUUM_FULL&hl=en&strip=1

If you're using 8.2 or earlier, dump and reload is the way to go for you.

--
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com   www.2ndQuadrant.us


pgsql-general by date:

Previous
From: Greg Smith
Date:
Subject: Re: Errors starting postgres after initializing new database
Next
From: Greg Smith
Date:
Subject: Re: Postgresql on EC2/EBS in production?