Обсуждение: Problems reading dump files coming from version 7.1 into version 8.1.

Поиск
Список
Период
Сортировка

Problems reading dump files coming from version 7.1 into version 8.1.

От
"Dumortier"
Дата:

Dear all,

 

I have been using PostgreSQL version 7.1 for years, but recently my hard disk had problems, I decided to change it and took the opportunity to move to the new version 8.1. This is a sun/solaris machine, v7.1 was working under Solaris 2.6, v8.1 is now running under Solaris 2.10.

To speed up and simplify the transfer I decided to produce dump files, the documentation indicates to use the pg_dump of the new version to produce them, could you give me some explanation on how this is possible (the libraries that v8.1 uses are very different from the ones used by v7.1, so it complains that it cannot find them), are you sure this is possible and how?

 

Since I could not figure how to make the pg_dump of v8.1 work correctly. I used the pg_dump of v7.1 and I obtained 5 files of about 5Go.

When I tried to read them back into 8.1, psql complained of errors related to literal carriage return which should be replaced by \r

 

I found on the mailing list a solution that someone had used which consisted in replacing the literal carriage returns using the “sed” program: sed ‘s/^M/\\r/’ file.dump > newfile.dump

The files were reduced to a bit more than 1Go each, but when I tried to read them in 8.1, it failed again with the same type of error.

 

Therefore I have two questions, (1) is there a patch which would allow v8.1 to read v7.1 dump files ? if not how can I run pg_dump of v8.1 on the v7.1 database?

 

Thanks in advance,

 

Sincerely,

 

PS:In fact, I am wondering if I need to move to 8.1, may be I could stick to 7.3 which apparently would read the 7.1 dump files.

 

Dr Dominique DUMORTIER

LASH-ENTPE

rue Maurice Audin

69518 Vaulx-en-Velin, Cedex

Tél: +33 (0)4 72 04 70 87

Fax: +33 (0)4 72 04 70 41

email: dominique.dumortier@entpe.fr

 

Re: Problems reading dump files coming from version 7.1 into version 8.1.

От
Tom Lane
Дата:
"Dumortier" <dominique.dumortier@entpe.fr> writes:
> Since I could not figure how to make the pg_dump of v8.1 work correctly. I
> used the pg_dump of v7.1 and I obtained 5 files of about 5Go.

> I found on the mailing list a solution that someone had used which consisted
> in replacing the literal carriage returns using the sed program: sed
> s/^M/\\r/ file.dump > newfile.dump

> The files were reduced to a bit more than 1Go each,

You did something very wrong then.  This should have produced files that
were larger not smaller than the originals (not a lot larger, unless
there were huge numbers of carriage returns, but definitely not smaller).

It's worth asking whether there really were carriage returns in your
data in the first place.  Maybe they were artifacts of having
transferred the dump file through a Windows machine?

            regards, tom lane