model-writtenrun 6225 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Dec 2019 - Apr 2020 · 8 entries
- Yuzuko Hosoya proposed automatically analyzing partitioned parents when a child needed maintenance, using existing sampling rather than attempting to merge child statistics #1.
- Laurenz Albe and Masahiko Sawada raised the cost of repeatedly processing whole partition trees, and Hosoya added a parent autovacuum_enabled option before the discussion converged on parent-specific analyze thresholds #2 #4 #5.
- Amit Langote and Sawada proposed accumulating changes_since_analyze through the ancestry and reusing existing statistics entries, while leaving irrelevant physical-table counters at zero #6 #7 #9 #11.
- Hosoya implemented that counter-based design, and Langote supplied a delta that removed duplicated autovacuum logic; Hosoya incorporated it and corrected inherited-stat reporting #13 #16 #17.
- Sawada's tests exposed misleading live/dead counts after TRUNCATE and VACUUM, leading Hosoya to report zero for those parent counters #18 #20.
- Reviews by Álvaro Herrera and Langote prompted manual-ANALYZE support and ancestor-processing changes, but processing leaves first changed error reporting and left the ordering design unsettled #22 #23 #26 #27.
- Justin Pryzby explained why time-series partitions could need parent statistics refreshed whenever an active child was analyzed, prompting discussion of alternative threshold modes and statistics merging without an adopted implementation #28 #32 #33 #34 #37.
- Hosoya replaced ANALYZE-time propagation with transaction-commit propagation, then returned after a gap with a rebase and a compiler-warning fix #29 #39 #41.
Jul - Dec 2020 · 3 entries
- Kyotaro Horiguchi found that cached ancestors could become stale after partition reattachment and identified an incorrect relation-kind condition, leading Hosoya back to ANALYZE-time propagation with an explicit top-level relation identifier #43 #45.
- Reviews by Horiguchi and Pryzby improved comments, zero-tuple handling, relation filtering, documentation, and syscache cleanup #46 #47 #48.
- Horiguchi then replaced the top-level identifier with a hash of already-analyzed relations, and Hosoya adopted that approach despite unresolved concerns about concurrent workers and cross-run double counting #50 #54 #55.
Mar - Apr 2021 · 6 entries
- Tomas Vondra demonstrated that the per-worker hash could still trigger redundant analyses and proposed bulk propagation with a separate already-reported counter, which Hosoya implemented #57 #59.
- Herrera cleaned up the new version, while Vondra identified counter-reset errors, missing manual propagation, and the need to propagate before deciding which tables to analyze; Hosoya incorporated those changes #60 #61 #65 #70.
- The participants left traditional inheritance outside the feature because its parents can hold their own rows and the statistics infrastructure could not separately represent parent-only and inherited counters; partition attachment and detachment handling also remained deferred #59 #66 #68 #69.
- Herrera moved propagation arithmetic into the statistics collector and committed the resulting submission with a column-list guard and counter cleanup as 0827e8af70, crediting Hosoya as author #71 #72.
- Herrera separately explored storing parent reltuples in pg_class to avoid repeated descendant scans, initially deferring that approach because TRUNCATE and other maintenance paths needed attention #73 #75.
- Pryzby identified missing storage-parameter documentation, and wording review by Pryzby and Tom Lane shaped Herrera's documentation patch into 41badeaba8 #78 #79 #80 #81.
Jul - Aug 2021 · 11 entries
- While working on shared-memory statistics, Andres Freund found excessive collector traffic, unreliable immediate statistics refresh, repeated catalog scans, and redundant sampling across nested partition trees #82 #83.
- Freund also demonstrated that manual ANALYZE reset counters before propagating them, while simply reversing the calls left parent counters nonzero after whole-tree analysis #84.
- Horiguchi supplied a corrective patch that propagated before resetting and reversed relation-processing order, but it again changed which relation appeared in error messages #86.
- Herrera proposed propagating only to topmost ancestors to reduce repeated sampling, then considered a broader design in which the collector retained ancestor relationships #90 #91 #93.
- A proposed two-patch rescue batched partition/root messages, reduced pg_class scans, moved catalog access out of pgstat.c, inserted a refresh delay, and moved the parent to the end of manual processing #95.
- Freund recommended reverting for PostgreSQL 14, and Herrera concluded that repeated ancestor index scans still required too much redesign during beta #94 #96.
- Herrera posted the reversal, discussed statistics-file compatibility with Lane, and committed it as 6f8127b739, removing the feature and related follow-ups while retaining partitioned-table view membership and an independent index-status fix #97 #98 #99 #101.
- Freund subsequently posted a hash-based alternative against the pre-revert implementation, but noted that repeated ancestor lookups and sample reuse still needed design work #103.
- Pryzby reported that the retained statistics-view rows misleadingly showed zero analyze counts and proposed restoring manual-ANALYZE counts and timestamps without restoring automatic analysis #102 #105.
- Herrera committed that narrower restoration as 375aed36ad, correcting statistics initialization and zero-tuple reporting in Pryzby's submission and crediting Hosoya, Pryzby, and himself #108.
- The thread ends with manual-ANALYZE reporting restored on both development and PostgreSQL 14 branches, automatic parent analysis still reverted, and future efficient propagation plus meaningful NULL values for unsupported counters unresolved #101 #103 #108.