model-writtenrun 2844 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Bertrand Drouvot proposed explicitly clearing PgStat_HashKey before assigning its fields after another development patch introduced padding and exposed unreliable statistics lookups; the existing structure had no padding, making this a preventive fix #1.
- Michael Paquier suggested using {0} initialization #2, but Jelte Fennema-Nio explained that it does not clear padding and supported the proposed memset approach while noting its strict standards limitations #3.
- Bertrand argued for fixing hash-key initialization before padding was introduced into released code #4 and clarified that his experimental failures affected all statistics kinds, not just relfilenode entries #5.
- Michael reproduced the problem by adding padding and proposed backpatching because a future bug fix might change this internal structure #6; Bertrand agreed that the change qualified as a low-risk fix #7.
- Michael committed the sole patchset #1 with unchanged code as 7d85d87f4d and confirmed backpatching through PostgreSQL 15, completing the work in this thread #8.