Re: COPY command returns "ERROR: invalid XML content"

From: Konstantin Izmailov <pgfizm(at)gmail(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: COPY command returns "ERROR: invalid XML content"
Date: 2019-10-08 02:23:49
Message-ID: CAAw-MscQTVS_++cOZxCD_jeQZ9cj0fK1BMLSVErxL+rCxHrQew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Please ignore this thread. After several days of debugging I found bug in
my application. It was misalignment of data when internal buffers
reallocated. After the application fix it all works as expected. Sorry for
the false alarm.

On Mon, Oct 7, 2019 at 7:03 PM Konstantin Izmailov <pgfizm(at)gmail(dot)com> wrote:

> Tomas, thank you for your reply! I cannot upload 2100+ xml files. Some of
> them are huge.
>
> I'm not sure if libpq is using libxml2 on Windows. In debugger I see very
> strange behavior of pqsecure_write. It seems like it stops sending data
> from provided buffer after 9,100,000 bytes.
>
> I hoped that someone came across similar issue, and bring some insight. I
> continue researching the issue.
>
> On Mon, Oct 7, 2019 at 5:13 AM Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
> wrote:
>
>> On Sun, Oct 06, 2019 at 08:45:40PM -0700, Konstantin Izmailov wrote:
>> >Hi,
>> >I'm using libpq (v10) to import lots of xml files into a PG10 table. I
>> >noticed if number of records imported exceeds 2100 then the following
>> error
>> >is returned:
>> >ERROR: invalid XML content
>> >DETAIL: line 1: Couldn't find end of Start Tag
>> >timeBasedFileNamingAndTriggerin line 1
>>
>> >logFile.%d{yyyy-MM-dd}.%i.html</fileNamePattern><timeBasedFileNamingAndTriggerin
>> >
>>
>> My guess is this is an issue/limitation in libxml2, which we use to
>> parse and process XML. What libxml2 version you have installed? Can you
>> share an example of a XML document to reproduce the issue?
>>
>> regards
>>
>> --
>> Tomas Vondra http://www.2ndQuadrant.com
>> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Artur Zając 2019-10-08 06:40:58 RE: Table locking during backup
Previous Message Konstantin Izmailov 2019-10-08 02:03:09 Re: COPY command returns "ERROR: invalid XML content"