On Sat, Oct 05, 2002 at 08:25:35PM -0400, Tom Lane wrote:
> Alvaro Herrera <[EMAIL PROTECTED]> writes:
> >>> 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.
> 
> We've got a ton of lock modes already; perhaps these operations can be
> mapped into acquiring some existing lock modes on index pages?

I'll have a look.  Can't say right now.  Some of the locks have special
semantics on what to do when a conflicting request arrives.

> Yeah, you can't recycle pages without a freelist :-(.

In access/nbtree/README says that the metapage of the index "contains a
pointer to the list of free pages".  However I don't see anything like
that in the BTMetaPageData.  Should I suppose that it was ripped out
sometime ago?  I'll add it if that's the case.  Or maybe I'm looking at
the wrong place?


> Maybe the freelist head link can be treated as a separately lockable
> object.

I think creating a new LWLockId (BTFreeListLock?) can help here.  The
operations on freelist are short lived and rather infrequent so it
doesn't seem to matter that it is global to all indexes.  Another way
would be to create one LockId per index, but it seems a waste to me.

-- 
Alvaro Herrera (<alvherre[a]atentus.com>)
"No hay ausente sin culpa ni presente sin disculpa" (Prov. frances)

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to