Re: Need some help in postgres locking mechanism

Поиск
Список
Период
Сортировка
От Vick Khera
Тема Re: Need some help in postgres locking mechanism
Дата
Msg-id CALd+dceh7be0t0B6xKuyQMLbyUsse1MTz99rG7Sh2mh00j7t+w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Need some help in postgres locking mechanism  (Hannes Erven <hannes@erven.at>)
Список pgsql-general
On Tue, Apr 8, 2014 at 11:28 AM, Hannes Erven <hannes@erven.at> wrote:
> 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

That's not really skipping over the locked rows and returning the next
row, that's bailing out and retrying.


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

Предыдущее
От: Hannes Erven
Дата:
Сообщение: Re: Need some help in postgres locking mechanism
Следующее
От: Steve Kehlet
Дата:
Сообщение: is there a way to firmly cap postgres worker memory consumption?