model-writtenrun 20 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jim Jones reported that XMLSERIALIZE(... INDENT) could crash the backend when its output exceeded the allocation limit, providing a reproducer in #1.
- Jim traced the crash to xmlSaveClose() freeing ctxt while leaving its pointer non-NULL after success, allowing a later allocation error to trigger a second close during exception cleanup in #1.
- The patch in #1 saved the close return value and cleared ctxt unconditionally; Jim demonstrated that the reproducer then returned an allocation error instead of crashing.
- Tom Lane committed the patch as f10500777b with light comment and commit-message edits, retaining its logic and backpatching through PostgreSQL 16.
- Tom confirmed that the fix had been pushed in #2, leaving the thread's sole patch committed with no outstanding work discussed.