Kelly Jones wrote:
I recently upgraded PostgreSQL, and now this happens:
# /etc/init.d/postgresql start
An old version of the database format was found.
You need to upgrade the data format before using PostgreSQL.
See /usr/share/doc/postgresql-8.3.8/README.rpm-dist for more information.
Unfortunately, I upgraded due to a hardware failure, and can't
dump/undump, since I don't have the old PostgreSQL server anymore.
Can I upgrade the data format w/o installing Postgres 7.2 (my
"data/base/1/PG_VERSION" file says "7.2")?
If not, can Fedora 11's "yum" install Postgres 7.2 (so I can at least
do a clean install/uninstall and then re-install 8.3.8)?
thats going to be pretty painful, actually.
first, make sure you have a backup of the postgres 7.2 data directory
and everything in it.
2nd, find and build 7.2, configuring it to run in a directory like
/home/pg72/ and restore a copy of your old data directory to
/home/pg72/data. make sure all these files are owned by hte postgres
user. edit the postgresql.conf file in that data dir to use a
different port, like 5433 rather than the default 5432. manually start
this 7.2 server like...
# su postgres -c "/home/pg72/bin/pg_ctl start -D /home/pg72/data"
now, clear the postgres 8.3.8 data directory where you tried to restore
your 7.2 $PGDATA, and create a new 8.3 cluster wiht initdb, and start 8.3...
# rm -rf /var/log/pgsql/data/*
# service postgresql initdb
# service postgresql start
now, try this...
# su - postgres
$ pg_dumpall -p 5433 | psql
and this should dump your 7.2 database using the 8.3.8 pg_dumpall tool,
and restore it to the 8.3.8 database.
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general