Re: SELECT FOR UPDATE and LIMIT 1 behave oddly

From: Andrea Suisani <sickpig(at)opinioni(dot)net>
To: josh(at)agliodbs(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: SELECT FOR UPDATE and LIMIT 1 behave oddly
Date: 2004-11-11 23:42:47
Message-ID: 4193F8F7.9030002@opinioni.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PostgreSQL Bugs List 2004-11-12 00:55:05 BUG #1315: unconvertible BIG5 character 0xf9d8
Previous Message andrea suisani 2004-11-11 23:06:48 Re: SELECT FOR UPDATE and LIMIT 1 behave oddly