Re: Conflict Detection and Resolution

From: Michail Nikolaev <michail(dot)nikolaev(at)gmail(dot)com>
To: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: shveta malik <shveta(dot)malik(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Jan Wieck <jan(at)wi3ck(dot)info>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Conflict Detection and Resolution
Date: 2024-10-21 01:14:00
Message-ID: CANtu0ojMjAwMRJK=H8y0YBB0ZEcN+JbdZeoXQn8dWO5F67jgsA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

> Sorry for being noisy, just for the case, want to notice that [1] needs
to be addressed before any real usage of conflict resolution.
> [1]:
https://www.postgresql.org/message-id/flat/OS0PR01MB5716E30952F542E256DD72E294802%40OS0PR01MB5716.jpnprd01.prod.outlook.com#8aa2083efa76e6a65f51b8a7fd579a23

I created two tests to reproduce the issue using the new conflict
resolution mechanics (based on the v16 patch).
One test detects an invalid delete_missing instead of
delete_origin_differs. Another test detects an invalid update_missing
instead of update_origin_differs.

You can change my $simulate_race_condition = 1; to 0 to make them pass.

[2] contains an explanation of the issue, and a possible fix can be found
in [3].

Best regards,
Mikhail

[2]:
https://www.postgresql.org/message-id/flat/CANtu0ohUB9ky45iiMAYN1fGyt82%2Bcg%3D%2BUYBom%3DP7drb%2B%3D97G9w%40mail.gmail.com#05a8d2ff9712f477cb92a9dfdab1aab6
[3]:
https://www.postgresql.org/message-id/flat/CANtu0oiziTBM8%2BWDtkktMZv0rhGBroYGWwqSQW%2BMzOWpmk-XEw%40mail.gmail.com#74f5f05594bb6f10b1d882a1ebce377c

Attachment Content-Type Size
v16-0001-TAP-tests-to-reproduce-issue-with-DirtySnapshot-.patch text/x-patch 12.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-10-21 02:13:59 Re: Add isolation test template in injection_points for wait/wakeup/detach
Previous Message Ajin Cherian 2024-10-21 00:45:20 Re: Conflict Detection and Resolution