Re: BUG #18274: Error 'invalid XML content'
Dmitry Koval <d.koval@postgrespro.ru>
From: Dmitry Koval <d.koval@postgrespro.ru>
To: pgsql-bugs@lists.postgresql.org
Date: 2024-01-14T18:28:50Z
Lists: pgsql-bugs
Attachments
- v1-0001-Added-support-of-XML_PARSE_HUGE-flag-for-XML-docu.patch (text/plain) patch v1-0001
Hi! Attached a patch that adds the use of XML_PARSE_HUGE flag for libxml2 functions and replaces some functions (that do not support this flag) with their equivalents. Using libxml2 library functions with support of XML_PARSE_HUGE flag increases maximum size allowed for a single text node from 10.000.000 to 1.000.000.000 (see XML_MAX_TEXT_LENGTH macro, libxml2/include/libxml/parserInternals.h) which in most cases solves the problem with insufficient memory. What do you think about the patch? Maybe it would be a good idea to add a GUC-variable for using of the XML_PARSE_HUGE flag? (The current behavior without XML_PARSE_HUGE flag is default). -- With best regards, Dmitry Koval Postgres Professional: http://postgrespro.com
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