Re: BUG #17893: Assert failed in heap_update()/_delete() when FK modiified by RI trigger in non-read-committed xact
Alexander Law <exclusion@gmail.com>
From: Alexander Lakhin <exclusion@gmail.com>
To: pgsql-bugs@lists.postgresql.org, Andres Freund <andres@anarazel.de>
Date: 2023-10-23T06:00:00Z
Lists: pgsql-bugs
Attachments
- v1-01-fix-asserts-in-heap_update-delete.patch (text/x-patch) patch v1
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
Commits
-
Fix assertions with RI triggers in heap_update and heap_delete.
- 60f227316c0e 17.0 landed
- b8a606e21b06 12.18 landed
- e434d3620a91 13.14 landed
- 59c62a21f243 14.11 landed
- 2873fbfe0d65 15.6 landed
- 9fee3232a1d3 16.2 landed