model-writtenrun 903 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Chao Li reported that expression-statistics keys matching a prefix of a valid name could be silently discarded while restoration reported success, and supplied a length-check fix with a regression test in #1.
- Chao Li also supplied a patch making the expression-count warning report the expected count, with tests for too few and too many expressions, in #1.
- In #1, Chao Li separately raised missing tuple cleanup in pg_clear_extended_stats() but left it unpatched because he considered it minor.
- Michael Paquier combined both attached patches unchanged and added tuple cleanup for the relation-mismatch path in a28fa2947d.
- In the final reply #2, sent just after the commit, Michael Paquier explained that silent data loss matters for supported manual statistics injection and that only the relation-mismatch path needs additional cleanup; all proposed fixes had landed.