Thursday, January 21, 2010

Upgrading postgres after an ubuntu dist-upgrade

After an ubuntu dist-upgrade, there is work to be done to bring a new version of postfix online. First you need to (unintuitively) drop the new empty postgres cluster:

pg_dropcluster --stop [new version number] main

Then upgrade the existing cluster (which will create a new one):

pg_upgradecluster [old version number] main

It looks like this does a complete duplication of the data, ie. it takes ages. Once it is finished, test it works, and get your diskspace back with:

pg_dropcluster [old version number] main

No comments: