model-writtenrun 8454 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Nikhil Sontakke demonstrated that dropping a composite attribute can make previously distinct stored values equal, violating uniqueness and breaking REINDEX and dump restoration; his patch added the existing composite dependency check to the column-drop path, including inheritance recursion and refusal under CASCADE #1.
- Nikhil submitted a revision that retained the fix and adapted the logical-decoding isolation test to rename an attribute instead of dropping it #2.
- Manu tested the revision successfully and confirmed its regression tests exercised the fix, but showed that composite constants in views, CHECK constraints, defaults, and function parameter defaults still changed meaning after an attribute drop #3.
- Manu reported that his separate stored-expression dependency patch composed with Nikhil's revision and passed testing; he also corrected composite-type error wording in that separate work, leaving the thread at that point with a tested combination but no posted combined patch or landing announcement #3.
- The later commit 0b0f5c5af1, authored by Heikki Linnakangas and committed by Noah Misch, addressed the broader dependency problem by rejecting previously ignored dependencies during type alteration; the supplied attribution in thread #253755 places it with that discussion, and it did not incorporate this thread's drop-path patch or resolve all dependency cases.
- After the November security fixes, Nikhil rebased the patch with its implementation unchanged: the strengthened dependency checker now also protected stored expressions, while attribute versioning alone preserved readability without preventing values from silently changing; he added expression tests and adapted tests that previously depended on dropping attributes after storing values #4.
- Manu reproduced the original failure and confirmed that the revised patch rejected the eight problematic scenarios and eighteen additional stored cases; he also found that a NULL composite constant in a view was rejected, consistently with ALTER TYPE, and confirmed equivalent behavior on REL_18_STABLE, making his separate patch unnecessary for these cases #5.
- Manu pointed out that the revised same-version pg_upgrade test no longer upgraded a stored datum whose dropped attribute had contained data, and the revised rowtypes test no longer dropped a column during UPDATE #5.
- Nikhil restored pg_upgrade coverage by holding the original datum in a PL/pgSQL variable across the drop and storing it afterward, and added an unstored nested-field assignment test while retaining rejection of drops during UPDATE of stored composites #6.
- Nikhil also found that dropping an attribute's datatype with CASCADE bypassed the earlier guard, so he added a check after all dependent objects were deleted to protect surviving stored values without rejecting commands that also removed their storing tables; he reported passing tests on REL_18_STABLE and left backpatching to committers #6.
- Zsolt Parragi showed that the new cascade check could break DISCARD TEMP, session exit, and autovacuum cleanup, and that SQL functions merely referencing a row type incorrectly prevented column drops, including CASCADE #7.
- Nikhil responded by exempting internal deletions, moving every column-drop check after deletion, and adding a drop-specific dependency check that blocks function defaults and SQL bodies only for constants or ROW() constructors of the type, allowing ordinary field dependencies and CASCADE to work normally; he added regression tests and documented the restriction #8.
- The latest patch remains uncommitted in the supplied thread, with Nikhil reporting that the full meson suite passes on master and that it applies cleanly to REL_18_STABLE; no subsequent review confirms the latest fixes, and the backpatch decision remains open #6 #8.