Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uemdS-00EJI8-9p for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Jul 2025 03:28:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uemdR-005u5u-3B for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Jul 2025 03:28:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uemdQ-005u5l-Q7 for pgsql-hackers@lists.postgresql.org; Thu, 24 Jul 2025 03:28:45 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uemdP-000UI7-0c for pgsql-hackers@lists.postgresql.org; Thu, 24 Jul 2025 03:28:44 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 56O3Scf81569826; Wed, 23 Jul 2025 23:28:38 -0400 From: Tom Lane To: Michael Paquier cc: Postgres hackers , Erik Wienhold Subject: Re: Regression with large XML data input In-reply-to: References: Comments: In-reply-to Michael Paquier message dated "Thu, 24 Jul 2025 12:12:28 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1569824.1753327718.1@sss.pgh.pa.us> Date: Wed, 23 Jul 2025 23:28:38 -0400 Message-ID: <1569825.1753327718@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > A customer has reported a regression with the parsing of rather large > XML data, introduced by the set of backpatches done with f68d6aabb7e2 > & friends. Bleah. > Switching back to the previous code, where we rely on > xmlParseBalancedChunkMemory() fixes the issue. Yeah, just reverting these commits might be an acceptable answer, since the main point was to work around a bleeding-edge bug: >> * Early 2.13.x releases of libxml2 contain a bug that causes >> xmlParseBalancedChunkMemory to return the wrong status value in some >> cases. This breaks our regression tests. While that bug is now fixed >> upstream and will probably never be seen in any production-oriented >> distro, it is currently a problem on some more-bleeding-edge-friendly >> platforms. Presumably that problem is now gone, a year later. The other point about >> * xmlParseBalancedChunkMemory is considered to depend on libxml2's >> semi-deprecated SAX1 APIs, and will go away when and if they do. is still hypothetical I think. But we might want to keep this bit: >> While here, avoid allocating an xmlParserCtxt in DOCUMENT parse mode, >> since that code path is not going to use it. regards, tom lane