En Fri, 04 Oct 2002 17:58:06 -0400
Tom Lane <tgl@sss.pgh.pa.us> escribió:
> Alvaro Herrera <alvherre@atentus.com> writes:
> > I'm looking at implementing the btree reorganizer described in "On-line
> > reorganization of sparsely-...", ACM SIGMOD proceedings 1996, by Zou and
> > Salzberg.
The title is "On-line reorganization of sparsely-populated B+-trees".
My purpose is to implement the reorganizer so that B+-trees can be
compacted concurrently with other uses of the index.
> > It seems to me I'll have to add some amount of lock types
> > in the lock manager. Does that bother you?
>
> Such as?
There are three new lock modes: R, RX and RS (Reorganizer, Reorganizer
Exclusive and Reorganizer Shared). Actually, they are not new lock
types; rather, new objects on which locks should be obtained before
using the index pages.
But there's some work to do before that. I need to make the nbtree code
actually use its free page list. That is, new pages for splits should
be taken from the free page, or a new page should be created if there
are none; also, deleting the last element from a page should put it into the
free page list. I'm looking at that code now. Let me know if you think
there's something I should know about this.
--
Alvaro Herrera (<alvherre[a]atentus.com>)
"El sudor es la mejor cura para un pensamiento enfermo" (Bardia)