model-writtenrun 6879 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Heikki Linnakangas reported that removing inheritance or detaching a partition leaves function defaults using child-to-parent row conversions executable but unrestorable from a dump #1.
- Jinqing Kuang reproduced the failure and proposed protecting required inheritance paths and fixing dump ordering, with broader explicit composite casts as an alternative; he also demonstrated restore failure before detachment because partition attachment follows function creation #2.
- Andrey Rachitskiy identified a separate crash: ALTER COLUMN TYPE changes a composite descriptor without rewriting stored constant tuple images, allowing function execution, expression deparsing, and dumping to read old bytes using the new layout #3.
- Manu submitted expression-scanning checks and regression tests after reproducing the crash across PostgreSQL releases back to 13; the patch deliberately preserved references without stored constants, did not repair existing damaged values, and left the original inheritance problem separate #4.
- Manu revised the patch to report standalone composite types and foreign tables correctly, centralize diagnostics, and test the composite-type case, explaining that it also composes with separate work checking attribute drops #5.
- Laurenz Albe questioned partition-expression coverage and whether prohibiting composite-type alterations broadly would be more practical than finding every unsafe persistent use #6.
- Manu explained that partition expressions were already checked, promised a regression test, and demonstrated session-dependent partition routing after an attribute drop; the last message defended targeted checks while leaving the broader policy decision and original restore problem unresolved #7.
- Heikki Linnakangas later authored a different implementation committed by Noah Misch as 0b0f5c5af1, rejecting type dependencies by default with explicit exceptions and specifying backpatching through PostgreSQL 14; it matches neither attachment and explicitly leaves some unsafe dependency cases for subsequent commits.
- Comparison with the current attribution for thread #253439 supports retaining 0b0f5c5af1 as arising from this discussion: that thread's attribute-drop patches address a separate call site, and its latest submission follows the commit.