Re: On-disk bitmap index patch

From: "Jie Zhang" <jzhang(at)greenplum(dot)com>
To: "Gavin Sherry" <swm(at)linuxworld(dot)com(dot)au>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, "Luke Lonergan" <LLonergan(at)greenplum(dot)com>
Subject: Re: On-disk bitmap index patch
Date: 2006-07-24 06:23:48
Message-ID: C0E9B584.8F43%jzhang@greenplum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message ITAGAKI Takahiro 2006-07-24 06:54:44 Re: pgstattuple extension for indexes
Previous Message Joe Conway 2006-07-24 06:22:14 Re: Values list-of-targetlists patch for comments (was Re: