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 1rPPBO-00BKfm-6E for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Jan 2024 15:47:27 +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 1rPPBN-00FxbC-0l for pgsql-bugs@arkaria.postgresql.org; Mon, 15 Jan 2024 15:47:25 +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 1rPPBM-00Fxb3-KT for pgsql-bugs@lists.postgresql.org; Mon, 15 Jan 2024 15:47:24 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rPPBJ-001fZh-2C for pgsql-bugs@lists.postgresql.org; Mon, 15 Jan 2024 15:47:23 +0000 Received: from [192.168.1.120] (unknown [46.164.243.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: d.koval@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 2B105E20E12; Mon, 15 Jan 2024 18:47:17 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1705333637; bh=yo13jEkPdsXxKF3S0tLANBpYnsqwOeSsWmpx+YOeEN4=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=LaDokK1YHwBfrzT4ALisxc5QmpCEEzf71ZNo39S1nrMypBqXCxOEdAMHyAcC4frsM yP1QTgUcV0IygRQUjFcDm5TLHJ92sm3yvtctt11VVlZgHevPo531pvnTo1pq9YKBoq 9ZB17NToVIEK6YlssFZIS2HC2BiOAtOYyR9j0znameNEXeSjbwmeyhsUP29CTCqIgc G1q5TxWAYMmn3Et/BZ8XNaUrxt3ouBoPx+uHUu/65utVNe5V6v1zTBkSh0qOnGLP0U n3jYcFlIM2zjN4WvrvKnVQPBtGpl1aC8wwNoysKo5+B+Unzt9EwP5LYSVFeJwGd4Y9 471Y14bwtYY4g== Message-ID: <35ef78f9-8958-4225-ae7e-aead71b0feed@postgrespro.ru> Date: Mon, 15 Jan 2024 18:47:17 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: BUG #18274: Error 'invalid XML content' To: Michael Paquier Cc: Tom Lane , pgsql-bugs@lists.postgresql.org References: <18274-98d16bc03520665f@postgresql.org> <1616257.1704651529@sss.pgh.pa.us> <5588db01-45be-48ff-b158-85f789bc502c@postgrespro.ru> <1314313.1705259848@sss.pgh.pa.us> <0eea123f-388a-41ea-9df3-d4606cf9ed8d@postgrespro.ru> Content-Language: en-US From: Dmitry Koval In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi! > Knowing that we have full control of the memory contexts for the XML > nodes, just enforcing the huge flag does not seem like there's any > downside for us. (Right?) I think that's right (flag XML_PARSE_HUGE shouldn't cause any problems). My main doubts are related to the replacement of the xmlParseBalancedChunkMemory() function (that haven't argument for pass XML_PARSE_HUGE flag) with xmlNewNode() + xmlParseInNodeContext() functions (create a fake node and pass the XML_PARSE_HUGE flag to xmlParseInNodeContext function). I'm not sure if this replacement is 100% equivalent (although simple tests work the same). -- With best regards, Dmitry Koval Postgres Professional: http://postgrespro.com