Re: SELECT FOR UPDATE and LIMIT 1 behave oddly

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: SELECT FOR UPDATE and LIMIT 1 behave oddly
Дата
Msg-id 200411111444.08432.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: SELECT FOR UPDATE and LIMIT 1 behave oddly  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: SELECT FOR UPDATE and LIMIT 1 behave oddly  (Andrea Suisani <sickpig@opinioni.net>)
Список pgsql-bugs
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.

--
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

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

Предыдущее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1313: problems with array syntax parsing in SQL statements
Следующее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1314: STATEMENT_TIMEOUT DOES NOT WORK PROPERLY