Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 64DF7B5DC35 for ; Fri, 15 Jul 2011 16:11:22 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 86281-02 for ; Fri, 15 Jul 2011 19:11:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 41877B5D8C5 for ; Fri, 15 Jul 2011 16:11:16 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p6FJBBOb017934; Fri, 15 Jul 2011 15:11:11 -0400 (EDT) To: David Ondrejik cc: Simon Riggs , pgsql-admin Subject: Re: vacuumdb question/problem In-reply-to: <4E208B57.6010401@noaa.gov> References: <4E206658.4040600@noaa.gov> <3239.1310749967@sss.pgh.pa.us> <4E208B57.6010401@noaa.gov> Comments: In-reply-to David Ondrejik message dated "Fri, 15 Jul 2011 14:47:51 -0400" Date: Fri, 15 Jul 2011 15:11:11 -0400 Message-ID: <17933.1310757071@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=0.001 X-Spam-Level: X-Archive-Number: 201107/117 X-Sequence-Number: 37896 David Ondrejik writes: > I am still wondering how the vacuum process actually works. When it > throws the output lines that show how many rows are > recoverable/nonremovable, does this mean that the vacuum has completed? No, that's just the end of the first pass over the table. After that it cleans out dead index entries, and then it sets about moving rows down to fill free space. As far as your original question is concerned: if you have reason to think there's a lot of bloat, CLUSTER would be the thing to use. Old-style VACUUM FULL is seriously inefficient when there's a lot of rows that have to be moved. regards, tom lane