model-writtenrun 1200 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Karavaev Alexey reported that contrib/xml2 dereferenced xmlBufferCreate() without checking for NULL #1, and Michael Paquier supplied a broader patch covering missing error contexts and leaked libxml2 allocations when PostgreSQL result allocation fails #2.
- Tom Lane found additional problems with error-state checks, xmlEncodeSpecialChars(), workspace ownership, and cleanup ordering #4; Michael responded by extending the fixes into the backend and moving XPath exception handling into callers while keeping error-context management separate from workspace cleanup #5.
- Jim Jones identified an unchecked xmlXPathCastNodeToString() allocation in the backend #7, and Michael expanded the checks to XML writer operations and XPath context allocation while leaving buffer-write checks outside this patch's scope #8.
- Jim proposed checking xmlAddChildList() #9, and Michael incorporated that check with an internal-error classification and split the work into backend and contrib patches #10; Jim approved the resulting series #11.
- Michael proposed waiting for PostgreSQL 19 development rather than backpatching these unlikely failure paths #10, and Tom supported that choice because the release-cycle risk of introducing bugs outweighed the limited practical benefit #12.
- The backend portion of #10 landed with identical file contents as 2e94721747, and the contrib portion landed as 732061150b after Michael added a missing pg_xml_done() call in xpath_string() during final review #15.
- After those commits, Robin Haberkorn questioned the remaining legacy XML error mode #16; Michael and Tom explained that changing it would alter behavior for invalid input #17 #18, and Robin confirmed that simply switching modes caused test failures or hangs, leaving that broader change unresolved #20.
- In March 2026, ChangAo Chen identified two declarations that made the pointed-to data volatile instead of the pointer variables #21 and supplied a corrective patch for the backend changes #22.
- Michael confirmed the volatile mistake #23 and committed ChangAo Chen's patch with only formatting differences as 6307b096e2, announcing the fix in #24.
- Alexander Lakhin then reported an undefined-behavior sanitizer failure when xslt_process() produced empty output and passed a NULL pointer to cstring_to_text_with_len() #25; Michael reproduced it, identified it as a longstanding problem, and supplied an empty-string fix with regression coverage #26.
- The empty-output patch #26 landed as 7d64419f80 with its new handling moved inside the successful-status branch and simplified to cstring_to_text(""); Michael ultimately backpatched it through PostgreSQL 14 #27.
- At the final message, all attached fixes had landed #27, while the broader proposal to eliminate legacy XML error handling remained outside the committed work after the behavioral and testing concerns in #18 and #20.