model-writtenrun 8032 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Fedor Erastov reported that a BEFORE UPDATE trigger returning OLD caused a false NOT NULL violation after adding a column with a default, whereas returning NEW or assigning the OLD field avoided the failure #1.
- Tom Lane traced the failure to an unexpanded disk tuple entering an executor slot without missing-attribute metadata and proposed expanding OLD tuples; Andrew Dunstan acknowledged the risk in the original metadata design, but no redesign was settled #2 #3.
- Amit Langote explained that PostgreSQL 11 already expanded these tuples and supplied a narrow trigger.c fix #4; Tom identified an ownership problem #5, corrected it, added a helper and regression tests, and committed ba9f18abd3, announcing completion in #6.
- Tom then proposed using the table's actual tuple descriptor instead of reconstructing one from the target list, avoiding tuple expansion and preserving dropped-column metadata; his replacement patch retained the regression test while removing the workaround, initially leaving stable branches with the narrower fix #7.
- Amit questioned the distinction between the new insertion filter and the existing conversion filter #8; Tom explained that target-list-derived descriptors lose dropped-column flags and potentially types #9, and Amit acknowledged the explanation in the thread's final message #10.
- The replacement patch from #7 subsequently landed unchanged as 20d3fe9009, completing the executor rework on the development branch.
- A later dropped-column crash report from Bertrand Drouvot in thread #43212 showed that stable branches also needed the executor rework; 8b39345a9d extended the development-branch regression test and recorded the corresponding backpatches to PostgreSQL 12 and 13.