Re: Re: Re: BUG #18750: Inappropriate update when it is blocked in RC

From: yrshen(at)stu(dot)xidian(dot)edu(dot)cn
To: "Pantelis Theodosiou" <ypercube(at)gmail(dot)com>
Cc: "Greg Sabino Mullane" <htamfids(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Re: Re: BUG #18750: Inappropriate update when it is blocked in RC
Date: 2024-12-26 09:47:55
Message-ID: 3d8f3ade.381.194025d9700.Coremail.yrshen@stu.xidian.edu.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

OK, I understand. I'm very grateful for your detailed explanation. Have a nice day, thank you!

2024-12-25 20:46:16 "Pantelis Theodosiou" <ypercube(at)gmail(dot)com> 写道:

On Wed, Dec 25, 2024 at 7:58 AM <yrshen(at)stu(dot)xidian(dot)edu(dot)cn> wrote:

Thank you very much for your explanation. So, under the READ COMMITTED of PostgreSQL, the UPDATE statement of Tx2 will only re-evaluate and update the initial row (null, 1), which it initially wanted to update, if the (null, 1) is then changed to (1, 3) by Tx1. Therefore, the expected result of the case is [(1,3), (1,2)] according to the rule of PostgreSQL instead of [(1, 2), (1, 2)], am I right?


Tx2 initially wanted to update the (1,1) row (WHERE a IS NOT NULL), which was then changed to (1,3) by Tx1. This is the row that Tx2 UPDATE statement will re-evaluate and update to (1,2).
The initially (null,1) row which is then changed to (1,3) by Tx1 is not touched by Tx2.

The expected result of the case is [(1,3), (1,2)] , that is correct.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message px shi 2024-12-27 02:44:42 Re: BUG #18753: Unable to Recover a Deleted Database Using PITR
Previous Message Markus KARG 2024-12-25 22:47:15 Re: psql v16.3 successfully connects via TLSv1.3 proxy, but psql v16.4 says "tlsv1 alert no application protocol"