Re: Need some help in postgres locking mechanism - Mailing list pgsql-general

From Hannes Erven
Subject Re: Need some help in postgres locking mechanism
Date
Msg-id 534415B0.3080503@erven.at
Whole thread Raw
In response to Re: Need some help in postgres locking mechanism  (Vick Khera <vivek@khera.org>)
Responses 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>)
List 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 by date:

Previous
From: Vick Khera
Date:
Subject: Re: SSD Drives
Next
From: Vick Khera
Date:
Subject: Re: Need some help in postgres locking mechanism