Re: CLUSTER, using SHARE UPDATE EXCLUSIVE lock?

Поиск
Список
Период
Сортировка
От Jonathan Scher
Тема Re: CLUSTER, using SHARE UPDATE EXCLUSIVE lock?
Дата
Msg-id 45E7FDA3.7080507@oxado.com
обсуждение исходный текст
Ответ на Re: CLUSTER, using SHARE UPDATE EXCLUSIVE lock?  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
> That's lock upgrading, which opens you up to deadlocks. If another
> process grabs a lock after your update exclusive, you're not going to
> be able to upgrade it.
>
>   

OK I got the point.
Is it possible to create a new table-level lock mode that says "OK, now 
I'm on share level, but soon I will upgrade it to exclusive". Then it 
would be possible to allow any read-only operation, and to forbid all 
operation that would need to upgrade.
I know that there is a sx_try_upgrade function on freeBSD kernel (man 
sx), so I guess there is a way to do it, isn't it?

Regards,
Jonathan Scher


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

Предыдущее
От: "Vishal Arora"
Дата:
Сообщение: xlogViewer / xlogdump
Следующее
От: "Vishal Arora"
Дата:
Сообщение: Re: xlogViewer / xlogdump