Re: postgres 8.2 "end-of-copy marker corrupt"

From: "David Monarchi" <david(dot)e(dot)monarchi(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: postgres 8.2 "end-of-copy marker corrupt"
Date: 2007-03-28 05:30:33
Message-ID: eea51fdb0703272230rbae1b27g4a8023f6c3ee97fe@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Thanks for the suggestions, Tom. The file is about 3G from a FreeBSD box,
but I'm doing some work on it on an XP box. I have a number of other files
that I created in exactly the same way from a PG 8.2 db on the BSD box.
They all load fine.

Each line is terminated with a LF (0A), including the last line. This is
the structure that of all of the other files that I can load have.

Some of the text fields in the file had \ in them, so I simply replaced all
of them with blanks to see if somewhere there was an escape sequence that
was causing the problem.

At this point, based on what you said, the only thing I can think of is an
errant quote.

I'm tempted to remove all single and double quotation marks, but that will
cause some other problems. Can you think of anything to do other than write
a program to load the data one record at a time to see where it breaks?
(There are 20M records in the file. )

Thanks again,
David

On 3/26/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> "David Monarchi" <david(dot)e(dot)monarchi(at)gmail(dot)com> writes:
> > I'm trying to copy a file to a table in Postgres 8.2 and keep receiving
> the
> > following message
>
> > ERROR: end-of-copy marker corrupt
> > CONTEXT: COPY domain_dom, line 3147756: ""
>
> Have you looked at the input file near that line number? My guess is
> misquoting of a \. sequence, or possibly (since you seem to be on
> Windows) a LF-vs-CR/LF end-of-line format issue. It need not be
> close to the actual end of that file...
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2007-03-28 14:15:35 Re: postgres 8.2 "end-of-copy marker corrupt"
Previous Message Shoaib Mir 2007-03-27 06:57:49 Re: VB6 and postgresql