Re: Fix spinlock usage in UnpinBuffer()

Поиск
Список
Период
Сортировка
От Qingqing Zhou
Тема Re: Fix spinlock usage in UnpinBuffer()
Дата
Msg-id dp1cnk$h7p$1@news.hub.org
обсуждение исходный текст
Ответ на Fix spinlock usage in UnpinBuffer()  (Qingqing Zhou <zhouqq@cs.toronto.edu>)
Список pgsql-patches
"Tom Lane" <tgl@sss.pgh.pa.us> wrote
>
> I noticed that shmem.c holds ShmemIndexLock considerably longer than any
> other spinlock is held, and across operations that could theoretically
> fail (hashtable manipulations).  This doesn't matter a lot in the Unix
> code because only the postmaster ever executes ShmemInitStruct, but
> in the Windows port we run that code every time a backend is launched.
> I think that we could convert that spinlock to an LWLock.  Will look into
> it.
>

Yeah, use LWLock is a safer way in order to recover to unlock status.

Regards,
Qingqing



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pl/python: fix ref leak on elog
Следующее
От: Neil Conway
Дата:
Сообщение: Re: pl/python: fix ref leak on elog