model-writtenrun 3689 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Dmitry Koval reported that large XML text could fail with 'invalid XML content' because xmlParseBalancedChunkMemory() could not accept XML_PARSE_HUGE, and Tom Lane encouraged a PostgreSQL-side fix #1 #2.
- Dmitry submitted a patch enabling XML_PARSE_HUGE throughout core XML and contrib/xml2 parsing, using a fake root with xmlParseInNodeContext() for XML content, and asked whether a GUC should control the behavior #3.
- Tom Lane opposed adding a GUC, and Michael Paquier and Tom examined libxml2's limits and initially considered unconditional use acceptable, despite Tom identifying unlimited dictionary growth and possible exposure to library bugs #4 #6 #7 #8.
- Dmitry questioned whether fake-root parsing was fully equivalent to the old API; Michael judged the approach equivalent for balanced chunks and requested explanatory comments and a check for other deprecated APIs #9 #10.
- Dmitry revised the patch with expanded comments and replaced the deprecated global entity-substitution setting with XML_PARSE_NOENT at each contrib/xml2 parsing call #11.
- Michael extracted the deprecated-API cleanup from the revised patch and committed it first as 65c5864d7f, explaining that the prerequisite should receive buildfarm exposure before the remaining change #12.
- The remaining large-XML support from #11 landed as 2197d06224, retaining the implementation with light comment and declaration-order edits.
- After a Coverity report and security-team discussion, Michael announced that large-XML support should be reverted because entity expansion could exhaust CPU or memory despite application input-size checks; the deprecated-API cleanup would remain #13.
- Dmitry agreed with the rollback, and Michael confirmed the revert in f2743a7d70, leaving only the API cleanup landed #14 #15.
- At the thread's end, Tom suggested investigating libxml2 2.12's amplification-control API as a possible safer route to larger inputs and noted compatibility problems requiring attention; no replacement patch was submitted #16.