X-Original-To: pgsql-hackers-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 37A609FA25B for ; Mon, 24 Jul 2006 03:24:08 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 85585-08 for ; Mon, 24 Jul 2006 03:24:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id B49369FA1E2 for ; Mon, 24 Jul 2006 03:24:02 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.mi8.com (d01gw02.mi8.com [63.240.6.46]) by svr4.postgresql.org (Postfix) with ESMTP id 909C55AFB22 for ; Mon, 24 Jul 2006 06:24:01 +0000 (GMT) Received: from 172.16.1.148 by mail.mi8.com with ESMTP (- Welcome to Mi8 Corporation www.Mi8.com (D2)); Mon, 24 Jul 2006 02:23:50 -0400 X-Server-Uuid: 7829E76E-BB9E-4995-8473-3C0929DF7DD1 Received: from MI8NYCMAIL05.Mi8.com ([172.16.1.189]) by D01HOST02.Mi8.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 24 Jul 2006 02:23:50 -0400 Received: from 71.146.16.17 ([71.146.16.17]) by MI8NYCMAIL05.Mi8.com ( [172.16.1.77]) via Exchange Front-End Server mi8owa.mi8.com ( [172.16.1.106]) with Microsoft Exchange Server HTTP-DAV ; Mon, 24 Jul 2006 06:23:49 +0000 User-Agent: Microsoft-Entourage/11.2.5.060620 Date: Sun, 23 Jul 2006 23:23:48 -0700 Subject: Re: On-disk bitmap index patch From: "Jie Zhang" To: "Gavin Sherry" , "Tom Lane" Cc: pgsql-hackers@postgresql.org, "Luke Lonergan" Message-ID: Thread-Topic: [HACKERS] On-disk bitmap index patch Thread-Index: Acau6bjw97HAjBrcEdu9vAARJITXBg== In-Reply-To: MIME-Version: 1.0 X-OriginalArrivalTime: 24 Jul 2006 06:23:50.0465 (UTC) FILETIME=[BA685310:01C6AEE9] X-WSS-ID: 68DAB8FC48W9019688-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.635 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, RCVD_NUMERIC_HELO X-Spam-Level: * X-Archive-Number: 200607/1017 X-Sequence-Number: 86872 Thanks Tom and Gavin for your comments! Yes, this patch is generated against 8.2 in a short time. As long as the code is working, I post the patch to get some comments and help. >> >> * The xlog routines need help; they seem to not be updated for recent >> changes in the API for xlog recovery code. > > Yep. The patch was actually against 8.1 and was hastily brought up to 8.2. > I think Jie's intention was to simply let everyone know that this was > going on. Thanks for pointing this out. I didn't notice that these are changed in 8.2. > >> >> * The hacks on vacuum.c (where it tests the AM name) are utterly >> unacceptable. If you need the main code to do something special for a >> particular index AM, define a bool flag column for it in pg_am. > > Yes. Sounds good. > >> >> * The interface to the existing executor bitmap scan code is mighty >> messy --- seems like there's a lot of almost duplicate code, a lot >> of rather invasive hacking, etc. This needs to be rethought and >> refactored. > > I agree. I will think about this more. > >> >> * Why in the world is it introducing duplicate copies of a lot >> of btree comparison functions? Use the ones that are there. > > Yes, I raised this with Jie and she has fixed it. One thought is, we may > want to rename those comparison functions prefixed with 'bm' to make their > naming less confusing. They'll be used by btree, gin and bitmap index > methods. Anyway, a seperate patch. Yeah, the main problem I hesitated to use btree's comparison functions because of those function names starting with 'bt'. Since Gavin told me that Gin is using those functions as well, I had changed them. Renaming them would be good. > >> >> * The patch itself is a mess: it introduces .orig and .rej files, >> changes around $PostgreSQL$ lines, etc. >> > > Right, not to mention patches to configure and a lot of style which needs > to be knocked into shape. > The way I generate a patch is kind of clumsy. I need to find a better way to do that. I will start fixing these. Thanks, Jie