Re: Conflict Detection and Resolution - Mailing list pgsql-hackers

From shveta malik
Subject Re: Conflict Detection and Resolution
Date
Msg-id CAJpy0uAEfA9Bhi=8U6dP--Jovj4ZZK88x2upD06xV1eMEAGhxw@mail.gmail.com
Whole thread Raw
In response to Re: Conflict Detection and Resolution  (Nisha Moond <nisha.moond412@gmail.com>)
Responses Re: Conflict Detection and Resolution
List pgsql-hackers
On Tue, Oct 8, 2024 at 3:12 PM Nisha Moond <nisha.moond412@gmail.com> wrote:
>

I have not started reviewing v15 yet, but here are few comments for
v14-patch003:

1)
In apply_handle_update_internal(), I see that
FindReplTupleInLocalRel() used to lock the row to be updated in
exclusive mode, but now since we are avoiding this call in recursion
and thus the second call onwards, the tuple to be updated or deleted
will not be locked in exclusive mode. You are perhaps locking it
(conflictslot passsed as localslot in recursion) somewhere in
FindConflictTuple in shared mode. Since we are going to delete/update
this tuple, shouldn't it be locked in exclusive mode?

2)
Also, for multiple-key violations case, it would be good to verify the
behavior that when say last update fails for some reason, all the
deleted rows are reverted back? It seems so, but please test once by
forcing the last operation to fail.

thanks
Shveta



pgsql-hackers by date:

Previous
From: Andrei Lepikhov
Date:
Subject: Re: Inconsistent RestrictInfo serial numbers
Next
From: vignesh C
Date:
Subject: Re: Pgoutput not capturing the generated columns