Re: BUG #17893: Assert failed in heap_update()/_delete() when FK modiified by RI trigger in non-read-committed xact

From: Alexander Lakhin <exclusion(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: BUG #17893: Assert failed in heap_update()/_delete() when FK modiified by RI trigger in non-read-committed xact
Date: 2023-10-23 06:00:00
Message-ID: 1236e144-d772-7ff4-6e23-4ce91d0923ad@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

02.09.2023 16:00, Alexander Lakhin wrote:
>
> Third, with this change applied I immediately got a failure of the next
> assert in heap_delete():
>             Assert(!ItemPointerEquals(&oldtup.t_self, &oldtup.t_data->t_ctid));
> which was introduced by 5db6df0c0.
Sorry for my mistake here. I had cited a wrong line. It should be:
        Assert(result != TM_Updated ||
               !ItemPointerEquals(&tp.t_self, &tp.t_data->t_ctid));

As I still can't see, which cases those asserts intended for, but see cases
when they are falsified, I propose removing them.
Please look at the complete patch attached.

Best regards,
Alexander

Attachment Content-Type Size
v1-01-fix-asserts-in-heap_update-delete.patch text/x-patch 5.5 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2023-10-23 08:18:32 Re: BUG #18155: Logical Apply Worker Timeout During TableSync Causes Either Stuckness or Data Loss
Previous Message Thomas Munro 2023-10-21 21:28:51 Re: BUG #18165: Could not duplicate handle for "Global/PostgreSQL.xxxxxxxxxx": Bad file descriptor