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 0BDEC54067 for ; Sat, 23 Apr 2005 00:12:51 -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 74143-03 for ; Sat, 23 Apr 2005 03:12:47 +0000 (GMT) Received: from flake.decibel.org (flake.decibel.org [67.100.216.10]) by svr1.postgresql.org (Postfix) with ESMTP id D14F854068 for ; Sat, 23 Apr 2005 00:12:39 -0300 (ADT) Received: by flake.decibel.org (Postfix, from userid 1001) id B4B5C15547; Fri, 22 Apr 2005 22:12:38 -0500 (CDT) Date: Fri, 22 Apr 2005 22:12:38 -0500 From: "Jim C. Nasby" To: Dave Chapeskie , pgsql-perform Subject: Re: Index bloat problem? Message-ID: <20050423031238.GA58835@decibel.org> References: <20050421173855.76286.qmail@web51410.mail.yahoo.com> <200504211044.48794.josh@agliodbs.com> <4267EFF9.2000908@rentec.com> <200504211128.43937.josh@agliodbs.com> <20050421193305.GA84813@ddm.wox.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050421193305.GA84813@ddm.wox.org> X-Operating-System: FreeBSD 4.11-RELEASE i386 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.8i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.01 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/634 X-Sequence-Number: 12031 You would be interested in http://archives.postgresql.org/pgsql-hackers/2005-04/msg00565.php On Thu, Apr 21, 2005 at 03:33:05PM -0400, Dave Chapeskie wrote: > On Thu, Apr 21, 2005 at 11:28:43AM -0700, Josh Berkus wrote: > > Michael, > > > > > ....Every five minutes, DBCC INDEXDEFRAG will report to the user an > > > estimated percentage completed. DBCC INDEXDEFRAG can be terminated at > > > any point in the process, and *any completed work is retained.*" > > > > Keen. Sounds like something for our TODO list. > > > > -- > > Josh Berkus > > Aglio Database Solutions > > San Francisco > > See http://archives.postgresql.org/pgsql-general/2005-03/msg01465.php > for my thoughts on a non-blocking alternative to REINDEX. I got no > replies to that message. :-( > > > I've almost got a working solution integrated in the backend that does > correct WAL logging and everything. (Writing the code to write and > replay WAL logs for complicated operations can be very annoying!) > > For now I've gone with a syntax of: > > REINDEX INDEX btree_index_name INCREMENTAL; > > (For now it's not a proper index AM (accessor method), instead the > generic index code knows this is only supported for btrees and directly > calls the btree_compress function.) > > It's not actually a REINDEX per-se in that it doesn't rebuild the whole > index. It holds brief exclusive locks on the index while it shuffles > items around to pack the leaf pages fuller. There were issues with the > code I attached to the above message that have been resolved with the > new code. With respect to the numbers provided in that e-mail the new > code also recycles more pages than before. > > Once I've finished it up I'll prepare and post a patch. > > -- > Dave Chapeskie > OpenPGP Key ID: 0x3D2B6B34 > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > -- Jim C. Nasby, Database Consultant decibel@decibel.org Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"