Reputation: 93
I have a problem with migration from PostgreSQL 8.3 to 9.1
/usr/lib/postgresql/9.1/bin/pg_upgrade -d /var/lib/postgresql/8.3/main -D /var/lib/postgresql/9.1/main -b /usr/lib/postgresql/8.3/bin -B /usr/lib/postgresql/9.1/bin -k -v
Running in verbose mode
Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories ok
Checking cluster versions
Old cluster data and binary directories are from different major versions.
Failure, exiting
Anyone can help ? Thx
Upvotes: 3
Views: 3691
Reputation: 324275
I thought you couldn't do a binary upgrade from 8.3 to anything; that pg_upgrade
supported 8.4 or newer. However it turns out 8.3 is supported with a bunch of extra restrictions.
If you can't use pg_upgrade
you must do a dump and reload to upgrade. If you're going to have to do a dump and reload, you might as well do it straight to 9.3, there's no point dumping and reloading to 8.4 then using pg_upgrade
.
Read the upgrade section of the release notes for every major version between your current one and the target version before upgrading. So read the 8.4, 9.0, 9.1, 9.2 and 9.3 release notes' upgrading/compatibility sections. Make sure you are aware of things like the standard_conforming_strings
change, bytea_output
default change, etc and how they will affect your program.
Also ensure your client drivers (psqlODBC, PgJDBC, nPgSQL, Python's psycopg2
, or whatever) are up to date when upgrading, preferably as new as or newer than the PostgreSQL database release you are going to be using.
Upvotes: 5