model-writtenrun 9519 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- David Rowley reported that periodically calling pg_stat_reset() clears the counters needed to trigger routine autovacuum and proposed documenting the danger and recommending ANALYZE afterward #1.
- Euler Taveira suggested handling missing statistics automatically, Peter Eisentraut proposed using analyze counters to identify affected tables, and Alvaro Herrera clarified that automatic ANALYZE could restore the information needed to decide whether to vacuum #2 #3 #4.
- David Rowley warned that analyzing every table after a reset could monopolize workers and delay other databases or anti-wraparound work, while Robert Haas argued that the scheduling problem needed broader treatment than an isolated tweak #5 #6.
- David Rowley renewed the documentation proposal; Bruce Momjian questioned why users reset statistics, Alvaro Herrera suggested preserving autovacuum counters, and Euler Taveira explained the implementation complications while supporting an explicit warning and ANALYZE recommendation #7 #8 #9 #10.
- David Rowley submitted the warning in doc/src/sgml/monitoring.sgml, explaining the risks of table bloat and stale statistics and recommending database-wide ANALYZE; he also described historical monitoring practices that motivated resets #11 #12.
- Vik Fearing noted that promotion also loses statistics, while Tomas Vondra opposed selectively preserving counters and recommended monitoring through snapshots and calculated differences #13 #14.
- Joe Conway proposed storing deltas separately with a dedicated reset command, but Tomas Vondra pointed out the retention and configuration machinery this would require and described third-party tools as the existing solution #15 #16.
- The thread ended with Jeff Janes explaining accidental resets and the practical burden of snapshot-based monitoring; the documentation patch remained posted without a recorded application, and the broader scheduling and monitoring proposals remained unresolved #17 #11.
- The warning eventually landed with wording edits in 4d070469c1, attributed to the later matching patchset #517841 in thread #46686, rather than directly to this thread's original submission.