pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John M. Layman <jml@frijid.net>
To: pgsql-admin@postgresql.org
Cc: John M. Layman <jml@frijid.net>
Subject: trouble migrating large objects from 7.1.3 to 7.3.2
Date: Mon, 21 Apr 2003 01:38:11 -0400
Message-ID: <000801c307c8$3950dc00$0400a8c0@frijid.net> (raw)

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

view thread (8+ messages)  latest in thread

Message-ID: <000801c307c8$3950dc00$0400a8c0@frijid.net>
Permalink:  ../000801c307c8$3950dc00$0400a8c0@frijid.net/
Also on:    postgresql.org/message-id/000801c307c8$3950dc00$0400a8c0@frijid.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jml@frijid.net
  Subject: Re: trouble migrating large objects from 7.1.3 to 7.3.2
  In-Reply-To: <000801c307c8$3950dc00$0400a8c0@frijid.net>
  References: <000801c307c8$3950dc00$0400a8c0@frijid.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox