>>> Josh Berkus <josh@agliodbs.com> wrote:
> 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.
Deadlocks like this are the only kind of serialization error possible
under "traditional" (non-MVCC) databases. These are much more rare in
MVCC than update conflicts, but that doesn't mean they aren't
serialization failures there, too. I think it is a violation of the
standard for PostgreSQL not to report them with SQLSTATE '40001'.
-Kevin