Re: bitmap AM design - Mailing list pgsql-hackers

From Tom Lane
Subject Re: bitmap AM design
Date
Msg-id 15313.1109662428@sss.pgh.pa.us
Whole thread Raw
In response to bitmap AM design  ("Victor Y. Yegorov" <viy@mits.lv>)
Responses Re: bitmap AM design
Re: bitmap AM design
List pgsql-hackers
"Victor Y. Yegorov" <viy@mits.lv> writes:
> Neil suggested a very good way how to handle updates. Of course, it's not
> necessary to strictly follow tuple layout in the table's heap, as I wanted
> to do initially. All that's needed, is that bit positions in bitmaps would
> be tied with CTID positions in LOC.
> So, we can do simple insert (generally, that's how MVCC works for tuple
> updates): when some tuple is updated, new CTID is added to the LOC and each
> bitmap is extended by 1 bit.

The other stuff you mentioned implies that an insertion therefore
requires exclusive lock on the index (because you may have to relocate
everything in sight to add one more CTID slot).

> On the other side (as Neil pointed), after VACUUM, we need to do some
> maintenance of bitmap index to avoid situations when index contains duplicate
> entries (in LOC and bitmaps) for the same CTID (value before marking tuple for
> reuse and after actually reusing it). So far, the fastest way would be
> recreating index,

I can't believe you are seriously suggesting that it's OK to force every
VACUUM to rebuild the index from scratch.  We already get far too many
complaints about the time needed for VACUUM.

I don't think we really need any more fundamentally nonconcurrent index
types :-(

> I've started to implement AM, I need to register am* functions, what OIDs
> should use to register them in include/catalog/pg_proc.h?

Anything the unused_oids script reports as free.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: SQL99 Hierarchical queries
Next
From: Evgen Potemkin
Date:
Subject: Re: SQL99 Hierarchical queries