model-writtenrun 6838 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Robert Haas proposed JSON/JSONB cleanup and FmgrInfo caching to support sandboxing and improve performance, separating a discovered record immutability bug from the refactoring in #1.
- Andrew Dunstan questioned error handling and repeated VARIADIC FmgrInfo copies in #2; Robert defended the simpler implementation in #3, while Tom Lane identified lost fn_extra caches in #4 and Robert supplied benchmarks supporting deferring further optimization in #5.
- The discussion shifted to PostgreSQL 19 correctness when jian he extracted the immutability work for backpatching in #6, leaving the caching refactoring for PostgreSQL 20.
- Shihao Zhong showed that altering a named composite could invalidate indexed JSON values in #7, and Manu demonstrated broader structural-change failures affecting unique and partial indexes, generated columns, and partition keys in #8.
- Jian posted a broader correction in #9, but Manu found that range recursion incorrectly consulted subtype JSON casts and supplied a tested fix in #10; Shihao confirmed that fix and exposed another error involving float output volatility in #11.
- Jian's next revision treated enums, composites, and user-defined ranges conservatively because later type or cast changes could invalidate indexed values in #12; Manu confirmed that it superseded his range delta, then supplied an additional array correction and documented an older unresolved scalar cast-dependency problem in #13.
- Robert identified the regression discussion as separate from his optimization series and requested a dedicated thread, an accurate commit message, and urgent release tracking in #14; Manu confirmed the move in #15, leaving Robert's caching series awaiting a rebase after the correctness issue was resolved.
- The continuation in thread #254541 led to Andrew Dunstan's revert b58a9a97fe, rather than adoption of the corrective attachments here; the commit warns that affected indexes, generated columns, and partition keys must be dropped or redefined before an upgrade that recreates them.