Re: Restoring 7.4 "pg_dumpall -o" output in 8.1 fails

From: "Jie Liang" <jliang(at)stbernard(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Andreas Gustafsson" <gson(at)gson(dot)org>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Restoring 7.4 "pg_dumpall -o" output in 8.1 fails
Date: 2006-08-10 18:25:27
Message-ID: 5E5A4BA7825B8742BB58DDF3B7041BF92BFF1F@mail01.stbernard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> ls -l
total 282
-rwxr-xr-x 1 jliang wheel 210873 Aug 10 10:54 pg_dump
-rwxr-xr-x 1 jliang wheel 57452 Aug 10 10:54 pg_dumpall
These are pg_dump(all) executable from postgresql-8.1.4
I copied them onto my postgresql-7.4.2 server and chmod to executable.
---(postgres(at)iguard)--(11:05:06AM)-- (/db/pg_backup)
> /usr/local/pg8.1.4/pg_dumpall -o |gzip > db.out.gz
su: /usr/local/pg8.1.4/pg_dumpall: cannot execute binary file
> /usr/local/pg8.1.4/pg_dump -t languages urldb > test
su: /usr/local/pg8.1.4/pg_dump: cannot execute binary file
User postgres have full permission under /db/pg_backup, so I don't know
how you could use 8.1's pg_dump(all) on 7.4 server.

Jie Liang

-----Original Message-----
From: pgsql-bugs-owner(at)postgresql(dot)org
[mailto:pgsql-bugs-owner(at)postgresql(dot)org] On Behalf Of Tom Lane
Sent: Friday, August 04, 2006 8:08 AM
To: Andreas Gustafsson
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] Restoring 7.4 "pg_dumpall -o" output in 8.1 fails

gson(at)gson(dot)org (Andreas Gustafsson) writes:
> I recently attempted to upgrade a PostgreSQL 7.4 installation to 8.1
> by following the instructions at
> <http://www.postgresql.org/docs/8.1/interactive/install-upgrading.html
> >,
> having used "pg_dumpall -o" to dump the data in 7.4. When I tried to
> restore the data in 8.1, psql reported a large number of syntax
> errors.

Try making the dump from the 7.4 server using 8.1's pg_dump(all).

If you've already wiped the 7.4 installation then you'll have to deal
with the incompatibilities yourself. It looked like setting
default_with_oids to true in the 8.1 server would help (although do you
*really* need to preserve OIDs in your dump? That -o switch is pretty
well deprecated these days). The "cannot delete from a view" is
probably coming from an attempt to "DELETE FROM pg_shadow", which you
can ignore. You didn't show us any other problems.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Browse pgsql-bugs by date

  From Date Subject
Next Message Jie Liang 2006-08-10 18:44:31 Restoring 7.4.2 pg_dumpall output in 8.1.4 fails
Previous Message dror 2006-08-10 15:51:35 Re: BUG #2558: initDB failed to run