model-writtenrun 4506 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Nathan Bossart opened the thread with work developed with Corey Huinker to avoid unnecessary analysis after pg_upgrade preserves statistics, proposing reusable catalog results and a deliberately breaking all/missing argument to --analyze-in-stages in #1.
- Masahiko Sawada supported the missing-statistics functionality and suggested extending it beyond staged analysis in #3, while Nathan reported developer-meeting consensus for preserving existing behavior and introduced a separate --missing-only option in #4.
- The revised implementation in #4 covered inherited extended statistics, respected disabled extended-statistics targets, and rejected servers older than PostgreSQL 15 rather than adding compatibility queries.
- John Naylor found the reusable-results interface difficult to understand in #5; Nathan retained the interface but documented its cases more clearly in #8, which John welcomed in #9.
- John's review in #11 prompted clearer option wording and relation-kind macros in #12, while Nathan left harmless attempts to analyze pg_statistic unchanged because ANALYZE already refuses to process it.
- The supplied canonical feature commit 5f8eb25706 matches the feature component of #8, rebased independently of the query-reuse refactoring, rather than the later revisions described by the thread's completion announcement.
- Nathan restricted catalog-result caching to the new mode and added pg_upgrade guidance in #15; John's documentation feedback in #16 led to explicit commands for both analyze modes and shared --jobs advice in #17.
- Nathan measured catalog-query time increasing from 65 milliseconds to 735 milliseconds on a large database in #18, considering that acceptable because avoiding unnecessary analysis should save substantially more work.
- Before finalizing the series, Nathan corrected expression-index handling to respect attstattarget in #19, and Corey endorsed the correction in #20.
- The final query-reuse component landed unchanged as 9c03c8d187, and the guidance component landed as c9d502eb68 with the option renamed to --missing-stats-only; both derive from #19.
- The feature component of #19, authored by Corey Huinker with Nathan Bossart, landed as edba754f05 with the --missing-stats-only name, tests moved to the main vacuumdb test file and extended to exercise --analyze-only, and catalog-name qualification fixes.
- Nathan announced completion in #21, reporting the final option name, relocation and expansion of tests, and additional catalog-query qualification fixes.
- Frédéric Yhuel reopened the discussion in July because the documentation implied that ANALYZE temporarily deletes existing statistics in #22; Bruce Momjian explored that interpretation in #23, David G. Johnston challenged it in #24, and Corey explained transactional statistics replacement in #26.
- Nathan clarified in #28 that the intended warning concerned --analyze-in-stages temporarily replacing existing statistics with lower-target results, and Frédéric supported explicitly qualifying the warning in #29.
- David proposed recording statistics targets so staged analysis could avoid reducing their quality in #30, but Nathan resisted changing the established option's behavior in #31, leaving that broader proposal outside this work.
- Nathan posted the documentation correction in #33, Corey and Jeff Davis endorsed it in #34 and #35, and it landed unchanged as da103c7bc8 with PostgreSQL 18 backpatching; the thread ends with Nathan's completion confirmation in #36.