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

Re: Revised Patch to allow multiple table locks in "Unison"

From: Fernando Nasser <fnasser(at)redhat(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Neil Padgett <npadgett(at)redhat(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, "pgsql-patches(at)postgresql(dot)org" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Revised Patch to allow multiple table locks in "Unison"
Date: 2001-07-30 18:09:41
Message-ID: 3B65A2E5.CCBF8B06@redhat.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Bruce Momjian wrote:
> 
> > It seems to me that we already have a small sleep in place. After all, in
> > order to acquite a lock, the shared memory area has to be accessed. So,
> > the contenders for a lock both have to go through a spin lock. So, if we
> > have the two "stuck" processes as in Tom's example, one will win at
> > acquiring the spin lock and the other will have to wait. So, they become
> > desynchronized, regardless of how many CPUs or what memory architecture
> > you have.
> 
> I see your point now, that they can't synchronize because they have to
> go through the same semaphore and therefore get out of sync.  Do they
> get out of sync enough for one to get the lock while the other is not
> holding it, or do the locks actually keep them in sync?  I don't know
> the answer.
> 

That is a good point.  With the current random sleeps it helps breaking
the
lockstep of the two processes, but when it is changed to a queue the
random
sleeps won't be there anymore.


-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser(at)redhat(dot)com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2001-07-30 18:14:18
Subject: Re: Revised Patch to allow multiple table locks in "Unison"
Previous:From: Bruce MomjianDate: 2001-07-30 17:58:15
Subject: Re: Performance TODO items

pgsql-patches by date

Next:From: Bruce MomjianDate: 2001-07-30 18:14:18
Subject: Re: Revised Patch to allow multiple table locks in "Unison"
Previous:From: Bruce MomjianDate: 2001-07-30 17:30:29
Subject: Re: Revised Patch to allow multiple table locks in "Unison"

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