Skip site navigation (1) Skip section navigation (2)

Re: Dump 7.1.3->7.4.2

From: "Cyril VELTER" <cyril(dot)velter(at)metadys(dot)com>
To: "Alvaro Herrera" <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Dump 7.1.3->7.4.2
Date: 2004-05-31 16:02:22
Message-ID: 102501c44728$a91caff0$dc01a8c0@lodgis.net (view raw or flat)
Thread:
Lists: pgsql-general
From: "Alvaro Herrera" <alvherre(at)dcc(dot)uchile(dot)cl>
> On Mon, May 31, 2004 at 07:57:01AM +0200, Cyril VELTER wrote:
> > From: "Doug McNaught" <doug(at)mcnaught(dot)org>
> > > "Cyril VELTER" <cyril(dot)velter(at)metadys(dot)com> writes:
> > >
> > > > I'm trying to dump a database from a 7.1.3 server to a 7.4.2 one.
> > > > It doesn't works because of difference in COPY format (unless I
> > > > use -d which is VERY slow on a 16G database).
> > >
> > > Try using the 7.4.2 version of pg_dump to dump out the 7.1.3
> > > database.  pg_dump is written to talk to multiple versions of the
> > > server, and it's generally recommended to use the same version of
> > > pg_dump as the server you're restoring into.
> >
> >     That's what I already do, but the problem is in COPY TO format
> >     (which is handled by the backend ? right ?)
>
> What backend?  7.4-pg_dump will generate 7.4-backend's compatible
> input, and the 7.1-backend does not interact at all --- save with
> 7.4-pg_dump, which will make itself understood easily ...
>
> Lots of people (including me) use this procedure to upgrade rather
> smoothly.  What's your problem exactly?

    Thanks for your response,

    Perhaps I'm mistaken, but it seems that pg_dump (the 7.4 one) will send
a COPY to STDOUT command to the 7.1 backend and blindly copy the output to
the dump file.

    Here's the kind of errors I get :

ERROR:  literal carriage return found in data
HINT:  Use "\r" to represent carriage return.
CONTEXT:  COPY c244, line 221: "662188  1002    1002    2002-08-05
12:15:12.20+00       2002-08-05 12:15:12.20+00       274     0000
01000100202010000000000..."

    By looking more closely in the dump file, there is a CR (embedded in a
text field) which is not encoded and confuse the restore

    cyril


In response to

Responses

pgsql-general by date

Next:From: linhluongDate: 2004-05-31 16:30:24
Subject: pg_dump question
Previous:From: Ben-Nes MichaelDate: 2004-05-31 15:11:58
Subject: Re: pg_dump and errors

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group