Skip site navigation (1) Skip section navigation (2)

Bitmapscan changes

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Patches <pgsql-patches(at)postgresql(dot)org>
Cc: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Subject: Bitmapscan changes
Date: 2007-03-12 12:25:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
Here's a patch to change the amgetmulti API so that it's called only 
once per scan, and the indexam adds *all* matching tuples at once to a 
caller-supplied TIDBitmap. Per Tom's proposal in July 2006:

The patch also adds support for candidate matches. An index scan can 
indicate that the tuples it's returning are candidates, and the executor 
will recheck the original scan quals of any candidate matches when the 
tuple is fetched from heap. The candidate status is tracked in TIDBitmap 
on a per-page basis.

No current indexams return candidate matches, but they can (and are with 
the patch) also be used when bitmap ANDing a lossy and non-lossy page: 
the result is a non-lossy candidate page, containing the bits of the 
non-lossy page.

The motivation for adding the support for candidate matches is that GIT 
/ clustered indexes need it. It's likely that we'll modify the API 
further to add support for the stream bitmaps when the bitmap indexam 
patch moves forward, but this is a step in the right direction and 
provides some immediate benefit.

I added some regression tests to test bitmap AND and OR with a mixture 
of lossy and non-lossy pages, and to test the GIN getbitmap function 
which wasn't being exercised by any existing the regression tests.

   Heikki Linnakangas

Attachment: getmulti_to_getbitmap.patch
Description: text/x-diff (62.4 KB)


pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2007-03-12 12:53:09
Subject: Re: Grouped Index Tuples / Clustered Indexes
Previous:From: Galy LeeDate: 2007-03-12 11:25:15
Subject: Re: autovacuum next steps, take 3

pgsql-patches by date

Next:From: Gavin SherryDate: 2007-03-12 13:06:21
Subject: Updated bitmap index patch
Previous:From: Simon RiggsDate: 2007-03-11 23:05:29
Subject: Re: [HACKERS] COMMIT NOWAIT Performance Option (patch)

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group