From: | "John M(dot) Layman" <jml(at)frijid(dot)net> |
---|---|
To: | <pgsql-admin(at)postgresql(dot)org> |
Cc: | "John M(dot) Layman" <jml(at)frijid(dot)net> |
Subject: | trouble migrating large objects from 7.1.3 to 7.3.2 |
Date: | 2003-04-21 05:38:11 |
Message-ID: | 000801c307c8$3950dc00$0400a8c0@frijid.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi - I'm trying to migrate a database with large objects from 7.1.3 to 7.3.2 & have so far been unsuccessful. I'm running both 7.1.3 & 7.3.2 on the same machine (running Slackware Linux 8.1) and I'm using the following command to migrate the data:
pg_dump -p 6543 -b -Ft -v -o dbase | pg_restore -p 5432 -Ft -v -o -d dbase
The above command causes pg_restore to fail with the following error:
pg_restore: [tar archiver] could not find header for file 37.dat in tar archive
If I omit the -o options, the dump & restore seem to work, but the OID's are incorrect & cannot be referenced. I know the data is there because the size of the new database on disc is roughly the same as the old database, but I cannot reference any of the data in the OID fields (all other fields are okay). All the values in the new OID fields increase by two, rather than represent the actual size of the data in the field. I have noticed that if I use psql to view the OID fields while the data is migrating, the numbers look correct right up until the end. It seems that during the last phase of pg_restore, the OID numbers get reset to some sequence that just increases by two for every OID. Here's a sample of what is in the OID column of both the old & new databases:
old new
26916 17034
29118 17036
30787 17038
33030 17040
36042 17042
The same problem occurs whether I pipe the output from pg_dump to pg_restore or use an intermediate file. I've also tried using pg_dumplo & get the same results (no error, just OID's whose value increase by two).
I've seen messages in the archive from other people with the same problem, but no answers were given.
Any ideas?
Thanks.
John Layman
From | Date | Subject | |
---|---|---|---|
Next Message | Pedro Salazar | 2003-04-21 08:55:00 | restore database with schema: owner schema must have superuser privileges? |
Previous Message | kp | 2003-04-20 15:17:43 | Re: Sequence scans on indexed row |