Re: [BUGS] Status of issue 4593

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: [BUGS] Status of issue 4593
Дата
Msg-id 496CD834.1080603@agliodbs.com
обсуждение исходный текст
Ответ на Re: [BUGS] Status of issue 4593  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: [BUGS] Status of issue 4593  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
Kevin,

> So, wouldn't it be better, if it's actually feasible to detect the
> problem situation, to make this another situation where SELECT FOR
> UPDATE can cause serialization failures?  That would allow
> applications to count on getting the rows in the requested order if
> the query completes successfully.  If existing documentation doesn't
> already cover the possibility of serialization failures when using FOR
> UPDATE, it should.  If we need to document something around the issue
> of this thread, that seems like the place to do it.

That's not how SELECT FOR UPDATE works.  SFU is pessimistic manual 
locking, which is supposed to *wait* for the rows to be exclusively 
available.  The deadlock timeout you encountered is the correct 
behaviour, not "serialization failure", which is what happens at commit 
time when the engine realizes that concurrent transactions are not 
serializably recreateable.

--Josh


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: New patch for Column-level privileges
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: [BUGS] Status of issue 4593