Re: Notes on lock table spilling

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Notes on lock table spilling
Date: 2005-04-05 03:49:55
Message-ID: 20050405034954.GA17353@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 04, 2005 at 11:32:47PM -0400, Greg Stark wrote:
>
> Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
>
> > Using Phantom Xids
> > ==================
> > The idea here is to use an approach similar to what we use now: mark the
> > tuples with an Xid when it is locked. A phantom Xid is a sort-of Xid,
> > with multiple real Xids associated to it. So we mark the tuple with the
> > regular Xid the first time the share lock is acquired; if a second
> > transaction wants to lock the tuple, it creates a new phantom Xid which
> > "contains" the original Xid in the tuple and its own Xid, insert it into
> > the phantom Xid table, and mark the tuple with that as Xmax.
>
> That sounds like a fancy way to describe "make a linked list of lockers".

Yeah, that's the idea :-) However I was trying to describe how it would
be stored. We have room for only one Xid in the tuple, so in order to
store multiple lockers, we invent the concept of an Xid that's tied to
multiple transactions.

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
Maybe there's lots of data loss but the records of data loss are also lost.
(Lincoln Yeoh)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2005-04-05 03:55:32 Re: PgFoundry.org busted?
Previous Message Christopher Kings-Lynne 2005-04-05 03:49:53 Re: PgFoundry.org busted?