Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id CD0B19FB286 for ; Wed, 17 Jan 2007 10:33:04 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 46517-04 for ; Wed, 17 Jan 2007 10:32:25 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by postgresql.org (Postfix) with ESMTP id 8C4F59FB262 for ; Wed, 17 Jan 2007 10:32:25 -0400 (AST) Received: from vanquish.pgh.priv.collaborativefusion.com (vanquish.pgh.priv.collaborativefusion.com [192.168.2.61]) (SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Wed, 17 Jan 2007 09:32:23 -0500 id 000564D4.45AE3377.00014E37 Date: Wed, 17 Jan 2007 09:32:23 -0500 From: Bill Moran To: pgsql-general@postgresql.org Subject: Index bloat of 4x Message-Id: <20070117093223.bcdb302e.wmoran@collaborativefusion.com> Organization: Collaborative Fusion X-Mailer: Sylpheed 2.3.0 (GTK+ 2.10.7; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/898 X-Sequence-Number: 107438 We just did a bunch of maintenance on one of our production databases that involved a lot of alter tables and moving records about and the like. Afterwards, I did a vacuum full and analyze to get the database back on track -- autovac maintains it under normal operations. Today I decided to run reindex during a slow period, and was shocked to find the database size drop from 165M to 30M. Keep in mind that the 165M is after vacuum full. So, apparently, there was 135M of index bloat? That seems a little excessive to me, especially when the docs claim that reindexing is usually not necessary. This is PostgreSQL 8.1.4. We've got upgrades to 8.2 planned, but it's going to be a few months before we can squeak that into a maintenance window. Additionally, I thought all the big index improvements were added in 7.4. I guess my question is whether or not this is expected. It's obviously not a good thing -- I've noticed that shared buffer usage has dropped dramatically as well (from 28,000 to 7000). I hadn't expected index bloat of this magnitude, and I'm concerned about when the database hits 2 or 3 G in size and has 12G just in indexes that take hours to rebuild. -- Bill Moran Collaborative Fusion Inc.