Re: bitmap AM design

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql(at)mohawksoft(dot)com
Cc: "Victor Y(dot) Yegorov" <viy(at)mits(dot)lv>, "Pg Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bitmap AM design
Date: 2005-03-01 18:59:20
Message-ID: 19478.1109703560@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

pgsql(at)mohawksoft(dot)com writes:
> A "persistent reference" index would be like almost any other index except
> that as new items are added to a table a new entry is added to the end of
> the index. When a row is updated, its CTID is updated in the table.

This *does not work* under MVCC: it can't cope with referencing
multiple simultaneously existing versions of a row. In general, any
index design that includes the words "update in place" can be rejected
out of hand.

In any case I still fail to see the advantage compared to an ordinary
serial primary key. You could have made your bitmaps reference the
serial numbers directly, instead of an intermediate table. (Either way
still fails to handle MVCC updates, unless the indexable attributes
cannot be changed by updates; but the intermediate table isn't helping
or hurting that.)

A bitmap that indexes CTIDs directly could work, because it doesn't need
to update any entries in-place when a table row is updated. I didn't
care for the details of Victor's design because (a) the intermediate
list of CTIDs looks bulky and (b) it seemed to require a lot of data
shuffling to cope with growth of the table. But in principle it would
work.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-03-01 19:05:41 Re: bitmap AM design
Previous Message Francisco Figueiredo Jr. 2005-03-01 18:56:06 Re: Execute and PortalSuspended needs explicit transaction