Re: SELECT FOR UPDATE and LIMIT 1 behave oddly - Mailing list pgsql-bugs

From Andrea Suisani
Subject Re: SELECT FOR UPDATE and LIMIT 1 behave oddly
Date
Msg-id 4193F8F7.9030002@opinioni.net
Whole thread Raw
In response to Re: SELECT FOR UPDATE and LIMIT 1 behave oddly  (Josh Berkus <josh@agliodbs.com>)
List pgsql-bugs
tnks for the hint ;)
I'll try something similar here.

Andrea

Josh Berkus wrote:
> Andrea,
>
>
>>i'm sorry for the curiosity.... but
>>could you share, if it's possible, this workaround? ;)
>>(if it's not the one you describe at the beginning thread
>>  e.g. don't use LIMIT 1)
>
>
> Well, we actually roped in the pg_locks view to do a "SELECT the first row not
> already locked for update".    Then added some code on the client end for
> error handling, like race conditions and no rows being returned, both of
> which happen in production.
>

pgsql-bugs by date:

Previous
From: andrea suisani
Date:
Subject: Re: SELECT FOR UPDATE and LIMIT 1 behave oddly
Next
From: "Magnus Hagander"
Date:
Subject: Re: Unable to run PostgreSQL 8 beta 3 on Windows XP Home