Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 4531B1F02EF8 for ; Thu, 26 Apr 2012 17:00:35 -0300 (ADT) Received: from cerberus.pinpointresearch.com ([66.7.238.130] helo=polaris.pinpointresearch.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SNUrf-0006qA-R1 for pgsql-performance@postgresql.org; Thu, 26 Apr 2012 20:00:34 +0000 Received: from betelgeuse.pinpointresearch.com (betelgeuse.pinpointresearch.com [192.168.1.179]) by polaris.pinpointresearch.com (Postfix) with ESMTP id 0D794E00EC83 for ; Thu, 26 Apr 2012 13:00:16 -0700 (PDT) Message-ID: <4F99A953.1060501@pinpointresearch.com> Date: Thu, 26 Apr 2012 13:00:19 -0700 From: Steve Crawford User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.27) Gecko/20120216 Lightning/1.0b2 Thunderbird/3.1.19 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: auto-vacuum vs. full table update References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/167 X-Sequence-Number: 46813 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