model-writtenrun 3763 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that a BEFORE DELETE trigger suppressing a cross-partition MERGE update caused uninitialized memory access, assertion failures or errors, with a reproducer affecting PostgreSQL 15 through master #1.
- Jian He proposed reordering the checks in ExecCrossPartitionUpdate(), then adding a returning-slot check to correct the command count #2 #3.
- Dean Rasheed explained that the reordered checks broke concurrent-update isolation tests and that MERGE's returning slot was always NULL; his attached replacement propagated TM_Result through the delete and cross-partition update functions, passed canSetTag into ExecUpdateAct(), and added trigger and row-count regression tests #4.
- Richard Guo tested and endorsed the patch, then questioned why a DELETE trigger could suppress movement between partitions while allowing updates within a partition; Dean explained that this was intentional and already documented, which Richard accepted #5 #6 #7.
- Jian He endorsed Dean's patch and suggested displaying partition bounds in the regression output to make the results easier to understand #8.
- Dean committed the attached patch unchanged apart from base context as 7e8c6d7af6, with the same change also represented by the listed backport a0ff37173d; his final message confirmed pushing and backpatching, and declined the expanded test output to preserve simplicity and consistency, leaving no patch outstanding #4 #9.