From: John M. Layman <jml@frijid.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: John M. Layman <jml@frijid.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: trouble migrating large objects from 7.1.3 to 7.3.2
Date: Tue, 22 Apr 2003 00:22:42 -0400
Message-ID: <000701c30886$d4daba10$0400a8c0@frijid.net> (raw)
References: <000801c307c8$3950dc00$0400a8c0@frijid.net>
<001d01c3083e$e4f26030$0400a8c0@frijid.net>
<19017.1050977647@sss.pgh.pa.us>
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" <tgl@sss.pgh.pa.us>
To: "John M. Layman" <jml@frijid.net>
Cc: <pgsql-admin@postgresql.org>
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" <jml@frijid.net> 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
>
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, tgl@sss.pgh.pa.us
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>
* 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