BUG #17301: SELECT gets weird result while two transactions are submitted concurrently

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: dddinary(at)163(dot)com
Subject: BUG #17301: SELECT gets weird result while two transactions are submitted concurrently
Date: 2021-11-27 18:14:01
Message-ID: 17301-61fbc4ef6a49bf89@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 17301
Logged by: Dinary Dai
Email address: dddinary(at)163(dot)com
PostgreSQL version: 14.0
Operating system: Ubuntu
Description:

/* init */ create table t(a int primary key, b int);
/* init */ insert into t values (1, 2), (2, 3)

/* t1 */ begin;
/* t1 */ set transaction isolation level repeatable read;
/* t1 */ select * from t where a = 1;
/* t2 */ begin;
/* t2 */ set transaction isolation level repeatable read;
/* t2 */ delete from t where a = 2;
/* t2 */ commit;
/* t1 */ update t set a = 2 where a = 1;
/* t1 */ select * from t where a = 2; -- [(2, 3), (2, 2)]
/* t1 */ commit;

The final SELECT statement gets result [(2, 3), (2, 2)], which violates the
primary key constraint on column `a`.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2021-11-28 04:15:36 Re: BUG #17288: PSQL bug with COPY command (Windows)
Previous Message PG Bug reporting form 2021-11-27 18:00:01 BUG #17300: Server crashes on deserializing text multirange