Re: trouble migrating large objects from 7.1.3 to 7.3.2

From: "John M(dot) Layman" <jml(at)frijid(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "John M(dot) Layman" <jml(at)frijid(dot)net>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: trouble migrating large objects from 7.1.3 to 7.3.2
Date: 2003-04-22 04:22:42
Message-ID: 000701c30886$d4daba10$0400a8c0@frijid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(at)sss(dot)pgh(dot)pa(dot)us>
To: "John M. Layman" <jml(at)frijid(dot)net>
Cc: <pgsql-admin(at)postgresql(dot)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(at)frijid(dot)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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-04-22 04:42:38 Re: trouble migrating large objects from 7.1.3 to 7.3.2
Previous Message Tom Lane 2003-04-22 02:14:07 Re: trouble migrating large objects from 7.1.3 to 7.3.2