Re: Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))
Дата
Msg-id CAEepm=0_13cqriFazHpYEBXeU0AjpFomsGe9XxFVTdi1zs44Lg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: Assert(LWLockHeldByMeInMode(lock, LW_EXCLUSIVE))  (Julien Rouhaud <julien.rouhaud@dalibo.com>)
Список pgsql-hackers
On Mon, Jun 20, 2016 at 3:43 PM, Craig Ringer <craig@2ndquadrant.com> wrote:
> On 18 June 2016 at 11:28, Thomas Munro <thomas.munro@enterprisedb.com>
> wrote:
>> Several times now when reading, debugging and writing code I've wished
>> that LWLockHeldByMe assertions specified the expected mode, especially
>> where exclusive locking is required.
>>
>> What do you think about something like the attached?  See also an
>> example of use.  I will add this to the next commitfest.
>
> I've wanted this before too, and was surprised it wasn't present. TBH I
> assumed there was a technical reason it wasn't and didn't investigate
> further because I just assumed it'd have been added with the original
> LWLockHeldByMe if it were simple.

Before ab5194e6f (25 December 2014) held_lwlocks didn't record the mode.

-- 
Thomas Munro
http://www.enterprisedb.com



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Experimental dynamic memory allocation of postgresql shared memory
Следующее
От: Paul A Jungwirth
Дата:
Сообщение: Re: Review: GiST support for UUIDs