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 >