Re: More FOR UPDATE/FOR SHARE problems

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, npboley(at)gmail(dot)com
Subject: Re: More FOR UPDATE/FOR SHARE problems
Date: 2009-01-25 01:53:27
Message-ID: 3328.1232848407@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> There you see a snapshot of the table that never existed. Either the
> snapshot was taken before the UPDATE, in which case i=3 should be
> included, or it was taken after the UPDATE, in which case i=4 should be
> included. So atomicity is broken for WHERE.

This assertion is based on a misunderstanding of what FOR UPDATE in
read-committed mode is defined to do. It is supposed to give you the
latest available rows.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2009-01-25 02:45:32 Re: More FOR UPDATE/FOR SHARE problems
Previous Message Tom Lane 2009-01-25 01:47:20 Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle