Re: Fwd: BUG #17017: Two versions of the same row of records are returned in one query

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: 李可强 <52194501011(at)stu(dot)ecnu(dot)edu(dot)cn>
Cc: tgl <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Fwd: BUG #17017: Two versions of the same row of records are returned in one query
Date: 2021-05-20 01:55:45
Message-ID: CAH2-WznF4rHqCZWkTHi7XAcNxp80W9DkYLuQ9Mp6ZusN9N2rnQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, May 19, 2021 at 12:27 AM 李可强 <52194501011(at)stu(dot)ecnu(dot)edu(dot)cn> wrote:
> There is no need to return the old version written by committed transactions. The query result fo Session B is very confusing!

FWIW I think that it's a matter of how the standard is interpreted.
You expect something that Kyle Kingsbury called "Adya repeatable
read". This interpretation of RR allows an application which only
accesses records by primary key to get serializable execution.
Essentially, the primary key is special in a system that uses
traditional two-phase locking (or something closer to it than the
Postgres model). But a predicate on the PK is not special in Postgres.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-05-20 01:55:48 Re: Generated column is not updated (Postgres 13)
Previous Message Mohan Nagandlla 2021-05-20 01:43:26 Re: BUG #17023: wal_log_hints not configured even if it on