model-writtenrun 1126 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Yugo Nagata proposed statistics for virtual generated columns to improve row estimates, comparing automatic ANALYZE collection, indexing, and explicit extended statistics; his initial patch expanded generation expressions during CREATE STATISTICS #1.
- After Andres Freund reported regression failures #2, Yugo fixed expression handling and obsolete tests, while recognizing that creation-time expansion would leave statistics tied to an old expression after its definition changed #3.
- Yugo switched to automatic collection during ANALYZE, with planner support for matching expanded expressions to virtual-column statistics #4, then added documentation and regression coverage #5.
- The automatic-collection proposal continued through rebases and an upstream-driven test adjustment into December 2025 #6 #7 #8.
- Dean Rasheed tested the automatic approach but argued that potentially expensive statistics collection should be optional, recommending explicit extended statistics with expansion deferred until ANALYZE #9; Yugo and Dean agreed that a single virtual column should qualify like a single expression #10 #11 #12.
- Yugo implemented the revised design by retaining virtual-column references in catalogs and expanding them during ANALYZE and planning #13, then added documentation and tests #14.
- Dean identified an unnecessary less-than-operator requirement for univariate statistics #15 and incorrect relation numbers caused by expanding expressions after ChangeVarNodes() #17; Yugo fixed both issues #16 #18.
- Dean requested clearer multivariate-statistics comments and errors #19, which Yugo incorporated along with the corresponding expected-output correction #20 #21.
- Dean reported successful dependency, permission and dump/restore testing and supplied a polished patch with broader documentation, smaller test data and corrected univariate tests; ALTER TABLE SET STATISTICS support for virtual columns was left for possible future work because ALTER STATISTICS already controls explicit statistics objects #22.
- Yugo accepted Dean's patch and requested clearer wording about non-virtual columns and automatic statistics #23; Dean committed it as f7f4052a4e, adding those clarifications and locally reworking validation order, error messages and tests #24.
- The thread ended with the explicit extended-statistics feature committed and Yugo confirming that he had reviewed the commit and found it good #25.