Re: lock on object is already held
От | Tom Lane |
---|---|
Тема | Re: lock on object is already held |
Дата | |
Msg-id | 18886.1385573437@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: lock on object is already held (Daniel Wood <dwood@salesforce.com>) |
Ответы |
Re: lock on object is already held
|
Список | pgsql-hackers |
Daniel Wood <dwood@salesforce.com> writes: > Does the original version of my stress test not repro the problem on 9.2? [ tries it ... ] No, it doesn't, or at least the MTBF is a couple orders of magnitude better than on 9.3. Another odd thing (seen with my short version as well as your original) is that 9.3/HEAD run the test case enormously faster than 9.2 and 9.1 do. The older versions seem to spend a lot of time sleeping, which I don't understand. > Why does LockAcquireExtended() test for "nLocks == 0" in the "if > (dontWait)" block before calling RemoveLocalLock()? Looks like a useless test to me --- we wouldn't be here at all if nLocks had been positive to start with, and there's nothing in between that could raise the count. On the other hand, removing a LOCALLOCK that did have positive count would be disastrous. Maybe what would be more appropriate is an Assert(nLocks == 0) in RemoveLocalLock(). regards, tom lane
В списке pgsql-hackers по дате отправления: