X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D0F80538AF for ; Thu, 21 Apr 2005 20:38:36 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 14707-07 for ; Thu, 21 Apr 2005 23:38:32 +0000 (GMT) Received: from priv-edtnes56.telusplanet.net (outbound01.telus.net [199.185.220.220]) by svr1.postgresql.org (Postfix) with ESMTP id 765E9542D9 for ; Thu, 21 Apr 2005 19:15:20 -0300 (ADT) Received: from localhost ([199.185.220.240]) by priv-edtnes56.telusplanet.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050421221522.JGNV23507.priv-edtnes56.telusplanet.net@localhost>; Thu, 21 Apr 2005 16:15:22 -0600 Received: from 209.17.183.249 ( [209.17.183.249]) as user a3a18850@192.168.200.1 by webmail.telus.net with HTTP; Thu, 21 Apr 2005 15:15:22 -0700 Message-ID: <1114121722.426825fa4474f@webmail.telus.net> Date: Thu, 21 Apr 2005 15:15:22 -0700 From: Mischa Sandberg To: Bill Chandler Cc: a3a18850@telus.net, pgsql-perform Subject: Re: Index bloat problem? References: <20050421190318.26022.qmail@web51404.mail.yahoo.com> In-Reply-To: <20050421190318.26022.qmail@web51404.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1-cvs X-Originating-IP: 209.17.183.249 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.082 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_POST, FORGED_RCVD_HELO X-Spam-Level: * X-Archive-Number: 200504/598 X-Sequence-Number: 11995 Quoting Bill Chandler : > ... The normal activity is to delete 3-5% of the rows per day, > followed by a VACUUM ANALYZE. ... > However, on occasion, deleting 75% of rows is a > legitimate action for the client to take. > > In case nobody else has asked: is your max_fsm_pages > > big enough to handle all the deleted pages, > > across ALL tables hit by the purge? > This parameter is most likely set incorrectly. So > that could be causing problems. Could that be a > culprit for the index bloat, though? Look at the last few lines of vacuum verbose output. It will say something like: free space map: 55 relations, 88416 pages stored; 89184 total pages needed Allocated FSM size: 1000 relations + 1000000 pages = 5920 kB shared memory. "1000000" here is [max_fsm_pages] from my postgresql.conf. If the "total pages needed" is bigger than the pages fsm is allocated for, then you are bleeding. -- "Dreams come true, not free." -- S.Sondheim, ITW