model-writtenrun 3702 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Shinya Kato demonstrated that switching stats_fetch_consistency from snapshot to cache inside a transaction retained stale WAL statistics, contrary to the documentation, and identified the same problem in five other statistics views #1.
- Shinya Kato proposed a conditional snapshot-clearing helper called separately by the six affected statistics fetch functions #1.
- Michael Paquier committed the fix with the conditional invalidation centralized in pgstat_snapshot_fixed(), retaining Shinya Kato’s authorship and targeting backpatches through PostgreSQL 15 235c09efbb.
- Michael Paquier explained that the shared location would also cover future statistics kinds and that a predictable automated test would require two sessions; he considered TAP but did not add a test #2.
- Shinya Kato thanked Michael Paquier for reviewing and committing the fix and endorsed the more concise implementation, closing the thread with the fix landed #3.