From: | Greg Smith <greg(at)2ndquadrant(dot)com> |
---|---|
To: | David Wall <d(dot)wall(at)computer(dot)org> |
Cc: | Postgres General Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: VACUUM FULL vs backup/restore |
Date: | 2010-04-28 04:31:22 |
Message-ID: | 4BD7BA1A.3030201@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)2ndQuadrant(dot)com www.2ndQuadrant.us
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2010-04-28 04:32:59 | Re: Postgresql on EC2/EBS in production? |
Previous Message | Greg Smith | 2010-04-28 04:26:39 | Re: Errors starting postgres after initializing new database |