From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | david(at)eclipsecat(dot)com |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: More on migragting the server. |
Date: | 2007-09-26 17:15:31 |
Message-ID: | 23281.1190826931@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
David Siebert <david(at)eclipsecat(dot)com> writes:
> I set up a test server using the latest 8.2 as suggest by the list and
> did pg_dump of the old data base.
> I created a new empty database with the same name an created a user with
> the same name as was on the old server.
> I then tried to do a restore using webmin just as a test and got errors.
Hm, your old version was 7.1 right? That predates the availability of
pg_depend information, which is what pg_dump must have to ensure that
it dumps objects in an order that has no forward references. When
dumping from such an old server, modern pg_dump versions will use some
ordering heuristics that sort of mostly work, but a few problems are
to be expected. In this example, for instance, it seems to have dumped
function pgadmin_get_rows(oid) before table pgadmin_table_cache, which
doesn't work.
What you'll need to do to get this reloaded is to manually modify the
load order. pg_restore has some options that help you do that ---
basically you get a listing of the TOC (table of contents) of the
archive file, and then manually rearrange that listing, and then tell
pg_restore to restore in the manually specified order. It will probably
take a bit of trial and error before you get it right, so I'd suggest
using pg_restore's -s option to not bother trying to load data until
you have a working load order.
Also, it might not be a bad idea to just omit the old pgAdmin objects
from the reload altogether, because they aren't going to be helpful
anyway for a modern pgAdmin. Leave them out and then install a modern
pgAdmin release after you've successfully loaded your own stuff.
(The same goes for any other contrib or third-party stuff you might have
in there --- 7.1-era code is going to need replaced.)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2007-09-26 17:52:38 | Re: Autostart PostgreSQL in Ubuntu |
Previous Message | Greg Smith | 2007-09-26 17:15:07 | Re: Help tuning a large table off disk and into RAM |