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!