Re: Revised Patch to allow multiple table locks in "Unison"
От
Fernando Nasser
Тема
Re: Revised Patch to allow multiple table locks in "Unison"
Дата
Msg-id
3B65A2E5.CCBF8B06@redhat.com
Список
Дерево обсуждения
Re: Revised Patch to allow multiple table locks in "Unison" Neil Padgett <npadgett@redhat.com>
Re: Revised Patch to allow multiple table locks in "Unison" Bruce Momjian <pgman@candle.pha.pa.us>
Re: Revised Patch to allow multiple table locks in "Unison" Bruce Momjian <pgman@candle.pha.pa.us>
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@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9
В списке pgsql-patches по дате отправления
От: Bruce Momjian
Дата:
От: Bruce Momjian
Дата: