model-writtenrun 757 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Yuelin Wang reported an assertion failure and potential heap buffer overflow when pg_stat_statements normalized ten small array literals, attributing it to insufficient space for squashed placeholders #1.
- Fujii Masao corrected the size analysis: normalization replaces the entire three-byte list, and the existing allowance first becomes insufficient when placeholder numbering reaches two digits #2.
- Fujii Masao attached a fix that counted squashed entries, reserved nine additional bytes per entry, and added a regression test using ten arrays #2.
- 王跃林 endorsed the corrected analysis and allocation formula in the thread's final message; no review of an expansible-buffer implementation appears in the supplied discussion #3.
- Noah Misch subsequently committed a different implementation credited to Álvaro Herrera: StringInfo replaced the fixed allocation and manual writes, resolving the reported overflow without incorporating the attached regression tests; the commit explains that dynamic growth simplifies the code and avoids precise size accounting 1e2795ddea.