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 1qRmp0-0034Gt-Jk for pgsql-general@arkaria.postgresql.org; Fri, 04 Aug 2023 04:53:54 +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 1qRmoy-003hyA-V2 for pgsql-general@arkaria.postgresql.org; Fri, 04 Aug 2023 04:53:53 +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 1qRmoy-003hwb-GU for pgsql-general@lists.postgresql.org; Fri, 04 Aug 2023 04:53:53 +0000 Received: from mail-yb1-xb2a.google.com ([2607:f8b0:4864:20::b2a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qRmou-000RIo-NA for pgsql-general@lists.postgresql.org; Fri, 04 Aug 2023 04:53:51 +0000 Received: by mail-yb1-xb2a.google.com with SMTP id 3f1490d57ef6-cfd4ea89978so1756219276.2 for ; Thu, 03 Aug 2023 21:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691124827; x=1691729627; 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=0VN+ZCj6/mvlyVp+tjKQ1/4EgLU7qyfCpFOuyaGEGC4=; b=cYcZFR2cR4uJB+gCrChr9Mp5PGnlyu2DF4OP80fYIGoVFcnQWCqSntfGKG6kulr9e1 tRxGpeZdwbXE+DeldsikSqvpZo/00WmUktv5HEJXjoPDQ75NAUfQrwxscAWXnuse4Utv 1qKxCQomQeZLj/a/dwZSSShxeypvECedhyc2TCNFbV6h9uIQvGlGqFzkUIN+tRQlcbIY zJJ0fl8fj/Cfym3lBN8pTxMXv9iqyEnnBgQffP1YvRM8rfwF4gA8tYDq0SrRpJvbNDE5 kGoYLqhKPrWXN41IBUAls9PGBepnPxGVRL3u/VO4icM4XFwnBY6j0XQIJ5kQWmwazwnL Za6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691124827; x=1691729627; 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=0VN+ZCj6/mvlyVp+tjKQ1/4EgLU7qyfCpFOuyaGEGC4=; b=haT4SvonPUSfAiA59jdeNr7J3cGjlyf4cUMcweoUUJovh5fjhg8ubG1Qr3FMbiF3Qq iXHV1EZMXWNVf6YdxxoF4sQCqWzDvK2kCYsC8wPEzADosmyiY8dZRlQv8O4QkVgsJDPi HHcedGdnKmPhiHenv7oN8I3HidbNpEil4CHWgc3umzWnG4+h28wFo9qKjhcIdDvG3O7i dLQddwV3lT2aR54SPfwsfqv8mDVDWvtXRoWKTojdmUDD6i9ED088FnOzCjEYSnlP1Oob P/rzTZ4o+kfwLAOiG/FUzLstTJ4vSRh/Mz6nmLTbCTHfrE5TbbyovwgXbPP727UKzCPx 2YvA== X-Gm-Message-State: AOJu0YwRd+1EOJLP/npdhX1QF6f6Qy4wpBTJZNYaX/rWTaCjiXyuM75T 8mwJpZQm4yDS6VyxKqA8T2PKEVu4a5k= X-Google-Smtp-Source: AGHT+IFkkaBDcCuUaf6NQ/5lmIxZWVSl8MaOYIWded703EifBb4QB1mTasPttVHq56pAF6e7Ek6DkA== X-Received: by 2002:a25:4255:0:b0:d37:d0f4:f007 with SMTP id p82-20020a254255000000b00d37d0f4f007mr527378yba.7.1691124827544; Thu, 03 Aug 2023 21:53:47 -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 125-20020a250883000000b00d0cae244e50sm395852ybi.35.2023.08.03.21.53.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Aug 2023 21:53:47 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------nVwq17pKxC4RzNenL9zucxPG" Message-ID: Date: Thu, 3 Aug 2023 23:53:46 -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: <30d2d7d1-47c2-386c-2ee3-06b338f1c7b3@gmail.com> 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. --------------nVwq17pKxC4RzNenL9zucxPG Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit I would install 14.7 on your Windows box (multiversioning /is/ supported, at least on Linux; probably Windows too), making sure that it uses the en_US.utf_8 locale (or the closest Windows analog). *Then* I'd try the same migration on the Windows box. After all development boxes should run the same software version as production... On 8/3/23 22:46, Sai Teja wrote: > Thank you for the reply. > > The pg version is 14.7 (Azure DB) > Locale :- > LC_COLLATE & LC_CTYPE : en_US.utf_8 > > Local postgreSQL:- Version:- (15.1-1-windows-x64-binaries) > > LC_COLLATE & LC_CTYPE:- > English_United States.1252 > > Please let me know if any other information is needed. > > Thanks & Best Regards, > Sai Teja > > > > > > > On Fri, 4 Aug, 2023, 8:03 am Ron, wrote: > > 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. > -- Born in Arizona, moved to Babylonia. --------------nVwq17pKxC4RzNenL9zucxPG Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit I would install 14.7 on your Windows box (multiversioning is supported, at least on Linux; probably Windows too), making sure that it uses the en_US.utf_8 locale (or the closest Windows analog).  Then I'd try the same migration on the Windows box.

After all development boxes should run the same software version as production...

On 8/3/23 22:46, Sai Teja wrote:
Thank you for the reply.

The pg version is 14.7 (Azure DB)
Locale :-
LC_COLLATE & LC_CTYPE : en_US.utf_8

Local postgreSQL:- Version:- (15.1-1-windows-x64-binaries)

LC_COLLATE & LC_CTYPE:-
English_United States.1252

Please let me know if any other information is needed.

Thanks & Best Regards,
Sai Teja






On Fri, 4 Aug, 2023, 8:03 am Ron, <ronljohnsonjr@gmail.com> wrote:
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.

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