model-writtenrun 9816 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Ronan Dunklau reported that pg_dump omitted statistics targets on expression-index columns, potentially causing poor plans after restoration, and Sergei Kornilov reproduced the omission #1 #3 #4.
- Michael Paquier proposed collecting index-column statistics in getIndexes(), emitting ALTER INDEX statements in dumpIndex(), and adding a test; automatic inheritance of statistics settings across partitions was left for separate work #7.
- Michael's initial patch supported PostgreSQL 11 and newer while leaving support for older servers open, and he immediately revised it to quote column names correctly with fmtId() #8 #9.
- Adrien Nayrat tested and inspected the patch, and Amul Sul subsequently reported successful feature testing and installcheck-world results #12 #14.
- When Michael revisited whether dumps should identify index columns by name, Tom Lane demonstrated that renaming table columns could change automatically generated expression-column names after restoration, making numeric column references necessary #15 #16.
- Michael posted cleanup changes that qualified array_agg, freed temporary arrays, and simplified test selection, then switched the queries and emitted statements to column numbers; this also settled the decision to support only PostgreSQL 11 and newer #18 #19.
- After resolving an apparent patch-application problem, Amul verified the revised behavior and test suites, while Tom inspected the patch and suggested testing an index containing columns with and without statistics targets #23 #26 #27.
- Michael expanded the multicolumn test and committed #19 with light changes as e4fca461ab, then confirmed that the fix had landed and been backpatched through PostgreSQL 11, completing the thread's work #28.