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

Re: bitmap AM design

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Victor Y(dot) Yegorov" <viy(at)mits(dot)lv>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bitmap AM design
Date: 2005-03-01 07:33:48
Message-ID: 15313.1109662428@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"Victor Y. Yegorov" <viy(at)mits(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Evgen PotemkinDate: 2005-03-01 08:28:09
Subject: Re: SQL99 Hierarchical queries
Previous:From: Josh BerkusDate: 2005-03-01 06:52:17
Subject: Re: SQL99 Hierarchical queries

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