Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 72C831337B4F for ; Tue, 30 Nov 2010 13:28:50 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 69209-03 for ; Tue, 30 Nov 2010 17:28:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by mail.postgresql.org (Postfix) with ESMTP id 3D643133655C for ; Tue, 30 Nov 2010 13:28:43 -0400 (AST) Received: from mh3.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh3.mail.rice.edu (Postfix) with ESMTP id AEF5128F6CD; Tue, 30 Nov 2010 11:28:42 -0600 (CST) X-Virus-Scanned: by amavis-2.6.4 at mh3.mail.rice.edu, auth channel Received: from mh3.mail.rice.edu ([127.0.0.1]) by mh3.mail.rice.edu (mh3.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id m3kQ5CI8wTfM; Tue, 30 Nov 2010 11:28:42 -0600 (CST) X-SMTP-Auth: no X-SMTP-Auth: no Received: from aart.is.rice.edu (aart.is.rice.edu [168.7.56.48]) by mh3.mail.rice.edu (Postfix) with ESMTP id 5D43928F701; Tue, 30 Nov 2010 11:28:42 -0600 (CST) Received: by aart.is.rice.edu (Postfix, from userid 18612) id 199CA2D5A6; Tue, 30 Nov 2010 11:28:42 -0600 (CST) Date: Tue, 30 Nov 2010 11:28:41 -0600 From: Kenneth Marshall To: Shridhar Polas Cc: pgsql-admin@postgresql.org Subject: Re: Space occupied by Postgres index. Message-ID: <20101130172841.GK19162@aart.is.rice.edu> References: <00b901cb90b3$ca9ddc40$5fd994c0$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00b901cb90b3$ca9ddc40$5fd994c0$@gmail.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/258 X-Sequence-Number: 36224 On Tue, Nov 30, 2010 at 10:56:53PM +0530, Shridhar Polas wrote: > Hi, > > > > I am facing a problem where indexes creates on some tables are occupying > huge space on disk and it seems to me that this space is not getting > reclaimed even when there are very few record in an associated table. > > > > When I ran full vacuum the disk space was reclaimed occupied by tables but > not by disk space occupied by indexes. > > > > Can somebody please tell me when disk space occupied by Postgres index is > reclaimed, without performing re-indexing on those tables? > > > > Thanks, > > Shridhar > VACUUM FULL will cause index bloat. You will need to REINDEX to recover the space. Note, you should not really need to use VACUUM FULL in a normal correctly configured system. Cheers, Ken