Re: More FOR UPDATE/FOR SHARE problems - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: More FOR UPDATE/FOR SHARE problems
Date
Msg-id 87iqo4kss3.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: More FOR UPDATE/FOR SHARE problems  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:

> On Sat, 2009-01-24 at 19:45 +0000, Greg Stark wrote:
>> There already is quite an extensive discussion of how FOR UPDATE  
>> behaves including these kinds of violations.
>
> Not in the documentation, that I can see. And I think it's important
> that it be there for the reasons I mentioned.
>
> Can you refer me to the dicussion that you're talking about? I don't
> remember any discussion that points out that FOR UPDATE/FOR SHARE is
> broken in the simple case of a simple WHERE clause.

http://www.postgresql.org/docs/8.3/static/transaction-iso.html#XACT-READ-COMMITTED
Because of the above rule, it is possible for an updating command to see aninconsistent snapshot: it can see the
effectsof concurrent updating commandsthat affected the same rows it is trying to update, but it does not seeeffects of
thosecommands on other rows in the database. This behavior makesRead Committed mode unsuitable for commands that
involvecomplex searchconditions. However, it is just right for simpler cases. For example, considerupdating bank
balanceswith transactions like...
 

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services!


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: More FOR UPDATE/FOR SHARE problems
Next
From: Robert Haas
Date:
Subject: Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle