From jml@frijid.net Mon Apr 21 05:39:07 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D33E5474E42 for ; Mon, 21 Apr 2003 01:39:07 -0400 (EDT) Received: from frijid.net (h00095b0c6e03.ne.client2.attbi.com [24.218.120.196]) by postgresql.org (Postfix) with ESMTP id DE38C474E42 for ; Mon, 21 Apr 2003 01:38:35 -0400 (EDT) Received: from earth (h00095b0c6e03.ne.client2.attbi.com [24.218.120.196]) by frijid.net (8.12.9/8.12.7) with SMTP id h3L5Z9gg015458; Mon, 21 Apr 2003 01:35:25 -0400 (EDT) Message-ID: <000801c307c8$3950dc00$0400a8c0@frijid.net> From: "John M. Layman" To: Cc: "John M. Layman" Subject: trouble migrating large objects from 7.1.3 to 7.3.2 Date: Mon, 21 Apr 2003 01:38:11 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0005_01C307A6.AB8854F0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Status: No, hits=-2.4 required=5.0 tests=BAYES_20,HTML_30_40 version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/307 X-Sequence-Number: 8462 This is a multi-part message in MIME format. ------=_NextPart_000_0005_01C307A6.AB8854F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 s= ame machine (running Slackware Linux 8.1) and I'm using the following comma= nd 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 arc= hive If I omit the -o options, the dump & restore seem to work, but the OID's ar= e incorrect & cannot be referenced. I know the data is there because the s= ize of the new database on disc is roughly the same as the old database, bu= t I cannot reference any of the data in the OID fields (all other fields ar= e 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 i= f I use psql to view the OID fields while the data is migrating, the number= s 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 increa= ses 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_restor= e or use an intermediate file. I've also tried using pg_dumplo & get the s= ame 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 ------=_NextPart_000_0005_01C307A6.AB8854F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi - I'm trying to migrate a database with= large=20 objects from 7.1.3 to 7.3.2 & have so far been unsuccessful.  I'm= =20 running both 7.1.3 & 7.3.2 on the same machine (running Slackware Linux= =20 8.1) and I'm using the following command to migrate the data:
 
pg_dump -p 6543 -b -Ft -v -o dbase | pg_re= store -p=20 5432 -Ft -v -o -d dbase
 
The above command causes pg_restore to fai= l with=20 the following error:
 
pg_restore: [tar archiver] could not find = header=20 for file 37.dat in tar archive
 
If I omit the -o options, the dump & r= estore=20 seem to work, but the OID's are incorrect & cannot be=20 referenced.  I know the data is there because the size of th= e new=20 database on disc is roughly the same as the old database, but I cannot=20 reference any of the data in the OID fields (all other fields are=20 okay).  All the values in the new OID fields increase by two, rather t= han=20 represent the actual size of the data in the field.  I have noticed th= at if=20 I use psql to view the OID fields while the data is migrating, the numbers = look=20 correct right up until the end.  It seems that during the last ph= ase=20 of pg_restore, the OID numbers get reset to some sequence that just=20 increases by two for every OID.  Here's a sample of what is in th= e OID=20 column of both the old & new databases:
 
 =20 old          =20  new
 
26916      &= nbsp;=20 17034
29118      &= nbsp;=20 17036
30787      &= nbsp;=20 17038
33030      &= nbsp;=20 17040
36042      &= nbsp;=20 17042
 
The same problem occurs whether I pip= e the=20 output from pg_dump to pg_restore or use an intermediate file.  I've a= lso=20 tried using pg_dumplo & get the same results (no error, just OID's whos= e=20 value increase by two).
 
I've seen messages in the archive from oth= er people=20 with the same problem, but no answers were given.
 
Any ideas?
 
Thanks.
 
 
       =20                = =20                = John=20 Layman
 
 
 
 
------=_NextPart_000_0005_01C307A6.AB8854F0-- From jml@frijid.net Mon Apr 21 19:47:59 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 999BB475AE5 for ; Mon, 21 Apr 2003 15:47:59 -0400 (EDT) Received: from frijid.net (h00095b0c6e03.ne.client2.attbi.com [24.218.120.196]) by postgresql.org (Postfix) with ESMTP id 4B8DF474E42 for ; Mon, 21 Apr 2003 15:47:54 -0400 (EDT) Received: from earth (h00095b0c6e03.ne.client2.attbi.com [24.218.120.196]) by frijid.net (8.12.9/8.12.7) with SMTP id h3LJiYgg015923; Mon, 21 Apr 2003 15:44:37 -0400 (EDT) Message-ID: <001d01c3083e$e4f26030$0400a8c0@frijid.net> From: "John M. Layman" To: Cc: "John M. Layman" References: <000801c307c8$3950dc00$0400a8c0@frijid.net> Subject: trouble migrating large objects from 7.1.3 to 7.3.2 Date: Mon, 21 Apr 2003 15:47:45 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001A_01C3081D.5A298490" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Status: No, hits=-8.9 required=5.0 tests=BAYES_20,HTML_30_40,REFERENCES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/291 X-Sequence-Number: 8446 This is a multi-part message in MIME format. ------=_NextPart_000_001A_01C3081D.5A298490 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 s= ame machine (running Slackware Linux 8.1) and I'm using the following comma= nd 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 arc= hive If I omit the -o options, the dump & restore seem to work, but the OID's ar= e incorrect & cannot be referenced. I know the data is there because the s= ize of the new database on disc is roughly the same as the old database, bu= t I cannot reference any of the data in the OID fields (all other fields ar= e 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 i= f I use psql to view the OID fields while the data is migrating, the number= s 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 increa= ses 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_restor= e or use an intermediate file. I've also tried using pg_dumplo & get the s= ame 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 ------=_NextPart_000_001A_01C3081D.5A298490 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi - I'm trying to migrate a database with= large=20 objects from 7.1.3 to 7.3.2 & have so far been unsuccessful.  I'm= =20 running both 7.1.3 & 7.3.2 on the same machine (running Slackware Linux= =20 8.1) and I'm using the following command to migrate the data:
 
pg_dump -p 6543 -b -Ft -v -o dbase | pg_re= store -p=20 5432 -Ft -v -o -d dbase
 
The above command causes pg_restore to fai= l with=20 the following error:
 
pg_restore: [tar archiver] could not find = header=20 for file 37.dat in tar archive
 
If I omit the -o options, the dump & r= estore=20 seem to work, but the OID's are incorrect & cannot be=20 referenced.  I know the data is there because the size of th= e new=20 database on disc is roughly the same as the old database, but I cannot=20 reference any of the data in the OID fields (all other fields are=20 okay).  All the values in the new OID fields increase by two, rather t= han=20 represent the actual size of the data in the field.  I have noticed th= at if=20 I use psql to view the OID fields while the data is migrating, the numbers = look=20 correct right up until the end.  It seems that during the last ph= ase=20 of pg_restore, the OID numbers get reset to some sequence that just=20 increases by two for every OID.  Here's a sample of what is in th= e OID=20 column of both the old & new databases:
 
 old         &nb= sp;=20  new
 
26916      &= nbsp;=20 17034
29118      &= nbsp;=20 17036
30787      &= nbsp;=20 17038
33030      &= nbsp;=20 17040
36042      &= nbsp;=20 17042
 
The same problem occurs whether I pip= e the=20 output from pg_dump to pg_restore or use an intermediate file.  I've a= lso=20 tried using pg_dumplo & get the same results (no error, just OID's whos= e=20 value increase by two).
 
I've seen messages in the archive from oth= er people=20 with the same problem, but no answers were given.
 
Any ideas?
 
Thanks.
 
           =             &nb= sp;            =    =20 John Layman
 
 
 
 
------=_NextPart_000_001A_01C3081D.5A298490-- From tgl@sss.pgh.pa.us Tue Apr 22 02:14:36 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 25F50475A8D for ; Mon, 21 Apr 2003 22:14:36 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 11E94474E42 for ; Mon, 21 Apr 2003 22:14:05 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h3M2E7U6019018; Mon, 21 Apr 2003 22:14:07 -0400 (EDT) To: "John M. Layman" Cc: pgsql-admin@postgresql.org Subject: Re: trouble migrating large objects from 7.1.3 to 7.3.2 In-reply-to: <001d01c3083e$e4f26030$0400a8c0@frijid.net> References: <000801c307c8$3950dc00$0400a8c0@frijid.net> <001d01c3083e$e4f26030$0400a8c0@frijid.net> Comments: In-reply-to "John M. Layman" message dated "Mon, 21 Apr 2003 15:47:45 -0400" Date: Mon, 21 Apr 2003 22:14:07 -0400 Message-ID: <19017.1050977647@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-29.1 required=5.0 tests=BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/292 X-Sequence-Number: 8447 "John M. Layman" writes: > 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 tar-archive code seems to have some bugs in it :-(. I will look at that, but the primary problem you are going to face here is that pg_restore needs to seek in the dump file to implement this operation, and it can't seek a pipe. I think you will need to (a) use -Fc not -Ft, and (b) write the dump to a temp file that pg_restore reads as a separate operation. regards, tom lane From jml@frijid.net Tue Apr 22 04:22:46 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D121E475A8D for ; Tue, 22 Apr 2003 00:22:46 -0400 (EDT) Received: from frijid.net (h00095b0c6e03.ne.client2.attbi.com [24.218.120.196]) by postgresql.org (Postfix) with ESMTP id 9A327474E42 for ; Tue, 22 Apr 2003 00:22:45 -0400 (EDT) Received: from earth (h00095b0c6e03.ne.client2.attbi.com [24.218.120.196]) by frijid.net (8.12.9/8.12.7) with SMTP id h3M4JTgg016214; Tue, 22 Apr 2003 00:19:31 -0400 (EDT) Message-ID: <000701c30886$d4daba10$0400a8c0@frijid.net> From: "John M. Layman" To: "Tom Lane" Cc: "John M. Layman" , References: <000801c307c8$3950dc00$0400a8c0@frijid.net> <001d01c3083e$e4f26030$0400a8c0@frijid.net> <19017.1050977647@sss.pgh.pa.us> Subject: Re: trouble migrating large objects from 7.1.3 to 7.3.2 Date: Tue, 22 Apr 2003 00:22:42 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Status: No, hits=-19.5 required=5.0 tests=BAYES_10,ORIGINAL_MESSAGE,QUOTED_EMAIL_TEXT,REFERENCES, WEIRD_QUOTING autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/293 X-Sequence-Number: 8448 Tom- thanks for the suggestion. As you mentioned, substituting Fc for Ft in the pipe command fails with an fseek error: pg_restore: [custom archiver] Dumping a specific TOC data block out of order is not supported without id on this input stream (fseek required) When I use option Fc with an intermediate file, I get an error about one of my sequences not existing. Do I have to do something different when using the Fc option? Here are the commands I was using: 7.1.3: pg_dump -p 6543 -b -Fc -v -o dbase > dump 7.3.2 initdb postmaster createdb dbase pg_restore -p 5432 -Fc -v -o -d dbase < dump And the error: pg_restore: [archiver (db)] could not execute query: ERROR: Relation "disc_idx_seq" does not exist I tried dropping the sequence & re-running the restore, but that just got me into more trouble. I'm guessing that I should let pg_restore create the database for me (instead of issuing a createdb command), but I can't get the -c or -C options to work. I get the following error when using either of them without running createdb: pg_restore: [archiver (db)] connection to database "dbase" failed: FATAL: database "dbase" does not exist in the system catalog And I get the following errors if I do run createdb: with option -c: pg_restore: [archiver (db)] connection to database "dbase" failed: FATAL: parser zero-length delimited identifier at or near """" at character 47 with option -C: pg_restore: [archiver (db)] connection to database "dbase" failed: CREATE DATABASE: database "dbase" already exists Am I doing something wrong here? ----- Original Message ----- From: "Tom Lane" To: "John M. Layman" Cc: Sent: Monday, April 21, 2003 10:14 PM Subject: Re: [ADMIN] trouble migrating large objects from 7.1.3 to 7.3.2 > "John M. Layman" writes: > > 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 tar-archive code seems to have some bugs in it :-(. I will look at > that, but the primary problem you are going to face here is that > pg_restore needs to seek in the dump file to implement this operation, > and it can't seek a pipe. > > I think you will need to (a) use -Fc not -Ft, and (b) write the dump to > a temp file that pg_restore reads as a separate operation. > > regards, tom lane > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > From tgl@sss.pgh.pa.us Tue Apr 22 04:42:40 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 913F5475F53 for ; Tue, 22 Apr 2003 00:42:40 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id D0690475F16 for ; Tue, 22 Apr 2003 00:42:39 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h3M4gcU6000192; Tue, 22 Apr 2003 00:42:40 -0400 (EDT) To: "John M. Layman" Cc: pgsql-admin@postgresql.org Subject: Re: trouble migrating large objects from 7.1.3 to 7.3.2 In-reply-to: <000701c30886$d4daba10$0400a8c0@frijid.net> References: <000801c307c8$3950dc00$0400a8c0@frijid.net> <001d01c3083e$e4f26030$0400a8c0@frijid.net> <19017.1050977647@sss.pgh.pa.us> <000701c30886$d4daba10$0400a8c0@frijid.net> Comments: In-reply-to "John M. Layman" message dated "Tue, 22 Apr 2003 00:22:42 -0400" Date: Tue, 22 Apr 2003 00:42:38 -0400 Message-ID: <191.1050986558@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-29.1 required=5.0 tests=BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/294 X-Sequence-Number: 8449 "John M. Layman" writes: > Am I doing something wrong here? Either that, or managing to hit a ton of corner-case bugs at the same time ... One thing to check: are you using 7.3's pg_dump to dump from the 7.1 database? If not, try it. The newer pg_dump should avoid at least some old bugs. If that doesn't help, I'd be interested to see a schema-only, text-style dump from your 7.1 database (please send it to me off-list). regards, tom lane From tgl@sss.pgh.pa.us Tue Apr 22 05:32:17 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C1518475A8D for ; Tue, 22 Apr 2003 01:32:17 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id DF923474E42 for ; Tue, 22 Apr 2003 01:32:16 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h3M5WAU6000590; Tue, 22 Apr 2003 01:32:10 -0400 (EDT) To: "John M. Layman" Cc: pgsql-admin@postgresql.org Subject: Re: trouble migrating large objects from 7.1.3 to 7.3.2 In-reply-to: <000701c30886$d4daba10$0400a8c0@frijid.net> References: <000801c307c8$3950dc00$0400a8c0@frijid.net> <001d01c3083e$e4f26030$0400a8c0@frijid.net> <19017.1050977647@sss.pgh.pa.us> <000701c30886$d4daba10$0400a8c0@frijid.net> Comments: In-reply-to "John M. Layman" message dated "Tue, 22 Apr 2003 00:22:42 -0400" Date: Tue, 22 Apr 2003 01:32:09 -0400 Message-ID: <589.1050989529@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-30.2 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,WEIRD_QUOTING autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/295 X-Sequence-Number: 8450 "John M. Layman" writes: > [ various problems... ] > pg_restore: [archiver (db)] could not execute query: ERROR: Relation > "disc_idx_seq" does not exist I couldn't reproduce this running the dump file you were kind enough to send me off-list. > I tried dropping the sequence & re-running the restore, but that just got me > into more trouble. I'm guessing that I should let pg_restore create the > database for me (instead of issuing a createdb command), Not necessarily, but you do usually want to start from an empty database --- dropping just one object is not going to work. > but I can't get the -c or -C options to work. I think this is mostly pilot error, probably compounded by insufficiently clear explanations in the docs. It might help to think about what each of these switches actually does. "-c" simply causes pg_restore to issue a "DROP foo" command immediately before each of its "CREATE foo" commands. (That's at the individual-object level, I don't think it applies to the whole database.) This switch strikes me as of little use --- it's always faster to just drop the whole database before you start the restore. (I suppose it might come in handy for certain kinds of database-merge operations, though.) What the "-C" switch does is cause pg_restore to issue a "CREATE DATABASE dbname" and then "\connect dbname" before it starts restoring individual objects. The gotcha here is you cannot say "-d dbname" in the pg_restore command line, because dbname doesn't exist yet. You have to tell it to initially connect to some DB that *does* exist, from whence it can issue the CREATE DATABASE command. So usually "-C" would go along with "-d template1". (If you can think of a better way to explain all this, patches for the documentation would be most welcome.) > pg_restore: [archiver (db)] connection to database "dbase" failed: FATAL: > parser zero-length delimited identifier at or near """" at character 47 This error confuses me though --- it doesn't square with the above considerations, and I couldn't reproduce it with your schema dump. Could you try it with statement logging enabled, and look to see exactly what commands pg_restore issued that led up to the failure? regards, tom lane From tgl@sss.pgh.pa.us Tue Apr 22 16:22:40 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7BC18475EEE for ; Tue, 22 Apr 2003 12:22:40 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id AF5764758C9 for ; Tue, 22 Apr 2003 12:22:37 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h3MGMaU6003659; Tue, 22 Apr 2003 12:22:36 -0400 (EDT) To: "John M. Layman" Cc: pgsql-admin@postgresql.org, Philip Warner Subject: Re: trouble migrating large objects from 7.1.3 to 7.3.2 In-reply-to: <001d01c3083e$e4f26030$0400a8c0@frijid.net> References: <000801c307c8$3950dc00$0400a8c0@frijid.net> <001d01c3083e$e4f26030$0400a8c0@frijid.net> Comments: In-reply-to "John M. Layman" message dated "Mon, 21 Apr 2003 15:47:45 -0400" Date: Tue, 22 Apr 2003 12:22:36 -0400 Message-ID: <3658.1051028556@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.5 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/296 X-Sequence-Number: 8451 "John M. Layman" writes: > 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 Philip Warner points out that "-o" for pg_restore means "restore in OID order", which requires seeking in the input file, which won't work on piped input. Try it without the -o on the restore side. (Offhand I'd bet that you don't really want -o on the dump side, either, but that's a different issue.) The error messages do leave something to be desired :-( regards, tom lane From jml@attbi.com Tue Apr 22 17:07:14 2003 X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D24004758C9 for ; Tue, 22 Apr 2003 13:07:14 -0400 (EDT) Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by postgresql.org (Postfix) with ESMTP id E90A8474E42 for ; Tue, 22 Apr 2003 13:07:01 -0400 (EDT) Received: from rwcrwbc58 (rwcrwbc58.attbi.com[204.127.198.47]) by rwcrmhc52.attbi.com (rwcrmhc52) with SMTP id <2003042217070105200h5c1ae>; Tue, 22 Apr 2003 17:07:01 +0000 Received: from [63.117.36.2] by rwcrwbc58; Tue, 22 Apr 2003 17:07:00 +0000 From: jml@attbi.com To: tgl@sss.pgh.pa.us Cc: pjw@rhyme.com.au, pgsql-admin@postgresql.org, jml@frijid.net Subject: Re: trouble migrating large objects from 7.1.3 to 7.3.2 Date: Tue, 22 Apr 2003 17:07:00 +0000 X-Mailer: AT&T Message Center Version 1 (Apr 15 2003) X-Authenticated-Sender: am1sQGF0dGJpLmNvbQ== Message-Id: <20030422170701.E90A8474E42@postgresql.org> X-Spam-Status: No, hits=-15.3 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,NO_REAL_NAME,QUOTED_EMAIL_TEXT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/305 X-Sequence-Number: 8460 Tom/Philip - I've tried with the -o option on the dump side only & I get the original problem - the OID's in the new database just increase by 2. The data is there, though, because the disc space decreases. I was originally running pg_dump & pg_restore without the -o options, but when I saw it wasn't working, I tried using the -o options in various combinations (pg_ dump only, pg_restore only & both).