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

From santhosh kumar
Subject Re: Need some help in postgres locking mechanism
Date
Msg-id CAOE+M7EGxMOjDAL6v2MmdjtfHFrcoAJopQX6Jpe3cDh5z2xT+Q@mail.gmail.com
Whole thread Raw
In response to Re: Need some help in postgres locking mechanism  (Hannes Erven <hannes@erven.at>)
List pgsql-general
Thanks alot..i have implemented in same format.You people are awesome.Thank You once again


On Tue, Apr 8, 2014 at 8:58 PM, Hannes Erven <hannes@erven.at> wrote:
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



--
K.Santhosh Kumar
Member of Technical Staff
Groupon,Chennai

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: is there a way to firmly cap postgres worker memory consumption?
Next
From: Sergey Konoplev
Date:
Subject: Re: streaming replication and recovery