From: Steve Crawford <scrawford@pinpointresearch.com>
To: pgsql-performance@postgresql.org
Subject: Re: auto-vacuum vs. full table update
Date: Thu, 26 Apr 2012 13:00:19 -0700
Message-ID: <4F99A953.1060501@pinpointresearch.com> (raw)
In-Reply-To: <CAFwQ8rd6G0r5oTTo=S=ONTHD797O_9NQLbAybTurPZE3i5ob5g@mail.gmail.com>
References: <CAFwQ8rd6G0r5oTTo=S=ONTHD797O_9NQLbAybTurPZE3i5ob5g@mail.gmail.com>
On 04/26/2012 12:49 PM, Craig James wrote:
> An update to our system means I'm going to be rewriting every row of
> some large tables (20 million rows by 15 columns). In a situation
> like this, can auto-vacuum take care of it, or should I plan on
> vacuum-full/reindex to clean up?
>
If you want to reclaim the space, a vacuum-full/reindex will do it. But
you are probably better off using cluster. Way faster and you get new
indexes as a by-product. Both methods require an exclusive lock on the
table. If you can't afford the downtime, check out pg_reorg
(http://pgfoundry.org/projects/reorg/)
Cheers,
Steve
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: scrawford@pinpointresearch.com
Subject: Re: auto-vacuum vs. full table update
In-Reply-To: <4F99A953.1060501@pinpointresearch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox