Re: Theoretical Basis for SELECT FOR UPDATE
From: Roy Hann <specially_at_processed.almost.meat>
Date: Tue, 4 Oct 2005 23:28:45 +0100
Message-ID: <OMWdnbmYMJain97enZ2dnUVZ8t2dnZ2d_at_pipex.net>
Date: Tue, 4 Oct 2005 23:28:45 +0100
Message-ID: <OMWdnbmYMJain97enZ2dnUVZ8t2dnZ2d_at_pipex.net>
"vc" <boston103_at_hotmail.com> wrote in message
news:1128453433.143208.246170_at_z14g2000cwz.googlegroups.com...
> The transactions deadlock because there is a *bug*: the programmer
> neglected to eliminate non-serializable transaction histories. Any
> transaction history whose serializability graph has cycles will
> deadlock.
Question: how can I know the serializability graph for a transaction I can't even find?
> The way to avoid the deadlock is naturally to eliminate
> non-serializable histories. In SQL Server, one would use the UPDLOCK
> hint:
[snip]
> In Oracle, SELECT FOR UPDATE is your friend.
And in other products there are other equivalent hacks.
Roy Received on Wed Oct 05 2005 - 00:28:45 CEST