Re: [BUGS] Status of issue 4593 - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: [BUGS] Status of issue 4593
Date
Msg-id 496CD834.1080603@agliodbs.com
Whole thread Raw
In response to Re: [BUGS] Status of issue 4593  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: [BUGS] Status of issue 4593  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: New patch for Column-level privileges
Next
From: "Kevin Grittner"
Date:
Subject: Re: [BUGS] Status of issue 4593