On Thu, 28 Aug 2025 at 15:10, Yugo Nagata wrote:
>
> Thank you for your suggestion and the test patch. The test looks good
> to me, so I’ve attached an updated patch including it.
Thanks, that mostly looks good to me.
There's one other place in ExecMergeMatched() that's using
TM_FailureData.ctid
On Thu, 4 Sept 2025 at 16:03, Yugo Nagata wrote:
>
> > I've updated that to use tupleid in the attached v3 patch, and added a
> > couple more isolation tests. In practice, however, I don't think that
> > error can ever happen because this check follows table_tuple_lock()
> > which has a similar te
On Thu, 4 Sep 2025 13:50:41 +0100
Dean Rasheed wrote:
> On Thu, 28 Aug 2025 at 15:10, Yugo Nagata wrote:
> >
> > Thank you for your suggestion and the test patch. The test looks good
> > to me, so I’ve attached an updated patch including it.
>
> Thanks, that mostly looks good to me.
Thank you
On Wed, 27 Aug 2025 14:44:55 +0100
Dean Rasheed wrote:
> On Sun, 24 Aug 2025 at 18:34, Yugo Nagata wrote:
> >
> > I confirmed this issue by executing the following query concurrently
> > in three transactions. (With only two transactions, the issue does not
> > occur.)
>
> Yes, I think 3 trans
> On Aug 25, 2025, at 01:34, Yugo Nagata wrote:
>
> Currently, TM_FailureData.ctid is used as a reference to the
> latest version of oldtuple, but this is not always correct.
> Instead, the tupleid passed to table_tuple_lock should be used.
Based on my understanding:
At line 3386:
On Sun, 24 Aug 2025 at 18:34, Yugo Nagata wrote:
>
> I confirmed this issue by executing the following query concurrently
> in three transactions. (With only two transactions, the issue does not occur.)
Yes, I think 3 transactions are required to reproduce this (2 separate
concurrent updates).
>
On 24.08.2025 20:34, Yugo Nagata wrote:
I've attached a patch to fix this.
I ran tests with this patch [1] and it seems to have fixed the issue.
Thank you very much for your work.
[1]
https://www.postgresql.org/message-id/attachment/180494/0001-Fix-misuse-of-TM_FailureData.ctid-in-ExecMergeMa
On Thu, 21 Aug 2025 16:30:09 +0300
Dmitry wrote:
> Hi hackers,
>
> I noticed an inconsistent update when executing MERGE commands, which
> looks more like a bug.
> In my test example, the value of 'val' should increase in an ascending
> monotonous sequence.
>
> Test system
> ===
> - A