model-writtenrun 6276 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane proposed consolidating libpq's OOM reports into helpers that retry after resetting a broken error buffer, addressing a robustness concern introduced by accumulating error messages, and requested a PostgreSQL 14 backpatch #1.
- Nathan Bossart approved the fallback while noting lost diagnostic context; Michael Paquier accepted that tradeoff but preferred one helper, whereas Andrew Dunstan and Tom favored two interfaces for simpler calls #2 #4 #5 #6.
- Andres Freund questioned whether the fallback could guarantee an error message and investigated gettext's OOM behavior; Tom explained that failed buffer expansion releases the existing storage and rejected changing the generic PQExpBuffer fallback into an error string #9 #11.
- Tom replaced the helper-based approach with checks at error-message readout points, allowing PQerrorMessage and pqSetResultError to substitute a constant OOM string; the original consolidation was left aside because its remaining benefit was only code-size reduction #12.
- Ranier Vilela proposed removing a temporary variable, then accepted that the code also needed to handle pqResultStrdup failure and endorsed the revised patch #13 #14 #17.
- The remaining discussion concerned conditional-expression style, with Tom explaining his readability and line-length choices and Robert Haas agreeing in the thread's last message; no further patch was posted #15 #19 #20.
- After the final message, Tom committed the revised patch with additional OOM handling for internal and server notices and a missing-newline correction, completing the fix on the development branch with a PostgreSQL 14 backport #12 514b4c11d2.