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 59AF553B57 for ; Thu, 21 Apr 2005 20:41:16 -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 16734-04 for ; Thu, 21 Apr 2005 23:41:10 +0000 (GMT) Received: from web51404.mail.yahoo.com (web51404.mail.yahoo.com [206.190.38.183]) by svr1.postgresql.org (Postfix) with SMTP id A178353BAD for ; Thu, 21 Apr 2005 19:59:24 -0300 (ADT) Received: (qmail 11939 invoked by uid 60001); 21 Apr 2005 22:59:26 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=Zw9Y+WE+WnvNzpm9AR00fBsQSgHxcUcv5yfqdX5P1QXQhjhHnB6VYpfPMqx7H8UTwQ6gah5pT9d1N4sDdUU/McnjldQ0X+ueBcrXa7WSkU9iJvtUGcvzx5MFsUaKg66XQJfo56p3TnowCXIa7WrMOEZoEPsZlvTChe/jhnPObSQ= ; Message-ID: <20050421225926.11937.qmail@web51404.mail.yahoo.com> Received: from [192.88.67.254] by web51404.mail.yahoo.com via HTTP; Thu, 21 Apr 2005 15:59:26 PDT Date: Thu, 21 Apr 2005 15:59:26 -0700 (PDT) From: Bill Chandler Subject: Re: Index bloat problem? To: Mischa Sandberg , pgsql-perform In-Reply-To: 6667 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.887 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, FROM_ENDS_IN_NUMS X-Spam-Level: X-Archive-Number: 200504/599 X-Sequence-Number: 11996 Mischa, Thanks. Yes, I understand that not having a large enough max_fsm_pages is a problem and I think that it is most likely the case for the client. What I wasn't sure of was if the index bloat we're seeing is the result of the "bleeding" you're talking about or something else. If I deleted 75% of the rows but had a max_fsm_pages setting that still exceeded the pages required (as indicated in VACUUM output), would that solve my indexing problem or would I still need to REINDEX after such a purge? regards, Bill --- Mischa Sandberg wrote: > 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 > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com