Re: Need some help in postgres locking mechanism

Поиск
Список
Период
Сортировка
От Hannes Erven
Тема Re: Need some help in postgres locking mechanism
Дата
Msg-id 534415B0.3080503@erven.at
обсуждение исходный текст
Ответ на Re: Need some help in postgres locking mechanism  (Vick Khera <vivek@khera.org>)
Ответы Re: Need some help in postgres locking mechanism  (Vick Khera <vivek@khera.org>)
Re: Need some help in postgres locking mechanism  (santhosh kumar <kurasanthoshkumar@gmail.com>)
Re: Need some help in postgres locking mechanism  (santhosh kumar <kurasanthoshkumar@gmail.com>)
Список pgsql-general
Hi,


On 2014-04-08 15:27, Vick Khera wrote:
[...]
> Problem 2: you cannot have a second process skip over locked rows.


In fact, you can: use "FOR UPDATE NOWAIT" and catch any errors.

e.g. SELECT * FROM jobqueue WHERE id=? FOR UPDATE NOWAIT



-hannes


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

Предыдущее
От: Vick Khera
Дата:
Сообщение: Re: SSD Drives
Следующее
От: Vick Khera
Дата:
Сообщение: Re: Need some help in postgres locking mechanism