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 1qRkcp-002py8-Nn for pgsql-general@arkaria.postgresql.org; Fri, 04 Aug 2023 02:33:12 +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 1qRkcn-002QzA-Vn for pgsql-general@arkaria.postgresql.org; Fri, 04 Aug 2023 02:33:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qRkcn-002Qz2-LL for pgsql-general@lists.postgresql.org; Fri, 04 Aug 2023 02:33:10 +0000 Received: from mail-yw1-x112a.google.com ([2607:f8b0:4864:20::112a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qRkcj-000ShM-VC for pgsql-general@lists.postgresql.org; Fri, 04 Aug 2023 02:33:09 +0000 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-5860c7fc2fcso19204337b3.2 for ; Thu, 03 Aug 2023 19:33:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691116384; x=1691721184; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=6mJc6p/WxH10RAp6Ni8RlfMGAoEaNpP9jrpK0lh4r3k=; b=RdwIPBOY7ikvvsR2Y1QbEG8/ZkACES5m2RFlMDMg/AQj2XrgrrFvKmiw60/+9eoIAl 6NxBgQU1dd4p92H0fVjeyLimk4wjD2UDS+8uXdgNqoqNyKruGoN3o8T8Vv7OQPB9OXV+ ecXO/oNXqa84ULxlAouCSdJkG3GEzdBvHxf/2BKr5z2NPEa/0HXehVpNJpKWy2BRyWYK vtdDEj3Inw6JQiF7TA+xXmFPzMLBlAm/YBGmTnGaVyx+QRQsDtAZkEB2VEUONoW5IH9m S16pZu8Uc/0nUmHH3Cdq/OzkvfPoDRsJTTNDELMe+OzBtVgIv8z2KAyKYWJrANZnLTY6 gxbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691116384; x=1691721184; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=6mJc6p/WxH10RAp6Ni8RlfMGAoEaNpP9jrpK0lh4r3k=; b=AEVbNqyPGm+8pcV2oqxXDz8EyfAOf47QxWp1cejjl+o82LdyaT474i/0bvD+rVBkWF Zde4yETEaOyaPzg45b9miG3vmHnhpFl3MqSoDDBBeyORg7miVdfPJIF32XJqsjC/9kAr QINtLdnBLlmfytLKv6CcLJwz2xglg1+Mwaa6zGxut0067HbmqPsVvV4x/v4SEGCaixR0 7QRm1mT8FWg5jkwYtc7+P4AW9sx5oBCOtKydfaPhSExgswqe2Snjr/wVhU+Ao2iHZSKW NfDkQG87QrUY6kihJ07eGfyK7f3456TxHMq7wYjNTcGxrqhTMX+/KipxY8l24dTst/j0 P82Q== X-Gm-Message-State: AOJu0Yxqu33Q6c376SwPRbJ/Wk4cVePmoCs2c0q5H9rNrVGW+fWUuiS4 6Z/TyYhGmR8mkhcGvbIg4WMpfzjrH9s= X-Google-Smtp-Source: AGHT+IFTLbbdvYbBBTYkZyd2vsRFeRD/JBk5bcTnckhk/nW3bbn+YBM/4zfFf9u60h55geSh5hh/5Q== X-Received: by 2002:a0d:ff06:0:b0:576:bfc7:1e43 with SMTP id p6-20020a0dff06000000b00576bfc71e43mr469142ywf.25.1691116383958; Thu, 03 Aug 2023 19:33:03 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:1488:8492:d7a6:6515? ([2600:1700:bd2c:b810:1488:8492:d7a6:6515]) by smtp.googlemail.com with ESMTPSA id s131-20020a815e89000000b005771d1c7756sm418003ywb.51.2023.08.03.19.33.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Aug 2023 19:33:03 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------XyWZANZQ8Hzja2m7LL5uzIO5" Message-ID: <30d2d7d1-47c2-386c-2ee3-06b338f1c7b3@gmail.com> Date: Thu, 3 Aug 2023 21:33:03 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: org.postgresql.util.PSQLException: ERROR: invalid XML content. Huge Input lookup Content-Language: en-US To: pgsql-general@lists.postgresql.org References: From: Ron In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------XyWZANZQ8Hzja2m7LL5uzIO5 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/3/23 21:22, Sai Teja wrote: > Hi team, > > I am trying to migrate the data from db2 to postgreSQL in which one of the > table is having XML data. > For one of the file (13MB) I'm facing an error with > > ERROR: invalid XML content > Detail: line 418061: internal error: Huge input lookup > nested exception is org.postgresql.util.PSQLException: ERROR: invalid XML > content > > I even tried with more size of XML data (30MB) but for this case I can > able to migrate the date successfully. > > But only for that file I'm facing the issue. > Later, I got to know that there are some special characters in that file > not sure whether this can be the issue or not. > > I'm using java.sql.preparedstatement > Preparedstatement.setSQLXML(iterator, xmlobject) to migrate the data from > db2 to postgreSQL > When I tried in my local postgreSQL (which is *windows* and located in > *APAC* region. I can able to migrate successfully) > But when I'm trying to migrate into *azure* postgreSQL (Linux OS, located > in *Germany*) facing an issue. That sounds like it has to do with locale differences between the two systems. *Exactly* what Pg version (including patch level) and locale are in each of the two systems? Even if it's not that, *something* is configured differently between the two systems. -- Born in Arizona, moved to Babylonia. --------------XyWZANZQ8Hzja2m7LL5uzIO5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 8/3/23 21:22, Sai Teja wrote:
Hi team,

I am trying to migrate the data from db2 to postgreSQL in which one of the table is having XML data.
For one of the file (13MB) I'm facing an error with 

ERROR: invalid XML content
Detail: line 418061: internal error: Huge input lookup
nested exception is org.postgresql.util.PSQLException: ERROR: invalid XML content

I even tried with more size of XML data (30MB) but for this case I can able to migrate the date successfully.

But only for that file I'm facing the issue.
Later, I got to know that there are some special characters in that file not sure whether this can be the issue or not.

I'm using java.sql.preparedstatement
Preparedstatement.setSQLXML(iterator, xmlobject) to migrate the data from db2 to postgreSQL
When I tried in my local postgreSQL (which is windows and located in APAC region. I can able to migrate successfully)
But when I'm trying to migrate into azure postgreSQL (Linux OS, located in Germany) facing an issue.

That sounds like it has to do with locale differences between the two systems.

Exactly what Pg version (including patch level) and locale are in each of the two systems?

Even if it's not that, something is configured differently between the two systems.

--
Born in Arizona, moved to Babylonia.
--------------XyWZANZQ8Hzja2m7LL5uzIO5--