Re: BUG #18274: Error 'invalid XML content'
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Dmitry Koval <d.koval@postgrespro.ru>, pgsql-bugs@lists.postgresql.org
Date: 2024-01-26T04:14:55Z
Lists: pgsql-bugs
Michael Paquier <michael@paquier.xyz> writes:
> On Thu, Jan 25, 2024 at 03:12:07PM +0300, Dmitry Koval wrote:
>> I agree that reverting a patch is a good idea if there are concerns about
>> server resources (XML is used by few users and there are even fewer users
>> who need to parse elements larger than 10Mb).
>> For such users it is better to create custom PostgreSQL build.
> And done with f2743a7d70e7.
Related to this: I just read some interesting things in libxml2 2.12's
release notes:
Most of the known issues leading to quadratic behavior in the XML parser
were fixed. Internal hash tables were rewritten to reduce memory
consumption.
A new API function xmlCtxtSetMaxAmplification was added to allow parsing
of files that would otherwise trigger the billion laughs protection.
Could it be that if we see this new function is available and use it,
we could allow more than we have done historically? I don't have a
whole lot of faith here, but perhaps this is worth investigation.
(BTW, 2.12 has created some annoying API breaks, which seems to be why
caiman is failing. We have some work to do there in any case.)
regards, tom lane
Commits
-
xml2: Replace deprecated routines with recommended ones
- 4b0e5d601291 12.19 landed
- bb418aeee270 13.15 landed
- 6fa5e67e832b 14.12 landed
- 689ba4f1c406 15.7 landed
- 7c93f31dee5f 16.3 landed
- 65c5864d7fac 17.0 landed
-
Revert "Add support for parsing of large XML data (>= 10MB)"
- f2743a7d70e7 17.0 landed
-
Add support for parsing of large XML data (>= 10MB)
- 2197d06224a1 17.0 landed