releaseOk and LWLockWaitForVar

Поиск
Список
Период
Сортировка
От Andres Freund
Тема releaseOk and LWLockWaitForVar
Дата
Msg-id 20140617121700.GB18143@awork2.anarazel.de
обсуждение исходный текст
Ответы Re: releaseOk and LWLockWaitForVar  (Amit Kapila <amit.kapila16@gmail.com>)
Re: releaseOk and LWLockWaitForVar  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-hackers
Hi Heikki, All,

Amit just pointed me to a case where the lwlock scalability patch
apparently causes problems and I went on to review it and came across
the following problem in 9.4/master:
LWLockWaitForVar() doesn't set releaseOk to true when waiting
again. Isn't that a bug? What if there's another locker coming in after
LWLockWaitForVar() returns from the PGSemaphoreLock() but before it has
acquire the spinlock? Now, it might be that it's unproblematic because
of hte specific way these locks are used right now, but it doesn't seem
like a good idea to leave it that way.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Abhijit Menon-Sen
Дата:
Сообщение: [REVIEW] Re: Compression of full-page-writes
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Wait free LW_SHARED acquisition - v0.2