model-writtenrun 7791 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Philipp Menke reported that PostgreSQL 13.1 rejected an UPDATE moving a row between partitions when a BEFORE UPDATE trigger assigned an unrelated field, even though the trigger did not change the partition key #1.
- Alvaro Herrera confirmed that the example should work and aimed to provide a fix for the February minor releases #2.
- After investigating, Alvaro initially thought corner-case behavior justified retaining the restriction, while concluding that its implementation was broken #3.
- Alvaro then traced the confusing behavior to interacting INSERT and UPDATE triggers and posted a patch removing only the UPDATE restriction: UPDATE already routes the modified tuple correctly, whereas INSERT cannot reroute it and benefits from the existing error check #4.
- Alvaro committed the patch with additional regression tests and an INSERT-specific documentation clarification as 6f5c8a8ec2, backpatched the fix to PostgreSQL 13, and closed the thread by announcing that it had been pushed #5.