I have installed PG 9.2 on my machine. I have a database cluster that was created about a year ago, using
initdb, using postgreSQL version 8.4.
The (8.4) data cluster consumes several Gb and so its on its own separate hard disk. I instructed the old 8.4 server to use the correct data location by passing it a -D /path/to/data/folder when the server was started.
My question is this:
I have a (v8.4) database cluster (containing about 10 databases) located at /some/path/to/datadir
I have a freshly installed postgreSQL 9.2 server.
How do I upgrade the cluster (and its databases), so that the new server can use the cluster - bearing in mind that I want the data to remain in the current data location (a physically separate device mapped to '/').
I tried running the server against the old cluster file by modifying the configuration file, and I (unsurprisingly), got the following error:
* Starting PostgreSQL 9.2 database server * The PostgreSQL server failed to start. Please check the log output: 2012-11-18 23:50:31 GMT FATAL: database files are incompatible with server 2012-11-18 23:50:31 GMT DETAIL: The data directory was initialized by PostgreSQL version 8.4, which is not compatible with this version 9.2.1.
So how can I upgrade an 8.4 cluster (in a specified data directory) to be used by a 9.2 server?