I host Barcamp Chicago’s website. It’s a custom Django site on Ubuntu. I recently upgraded the server to the latest LTS and later discovered my Postgresql database was gone. Postgresql had gone from 8.3 to 8.4 in the upgrade, but since it didn’t warn me about needing to migrate the data I assumed it took care of that. That was a mistake. I had three databases on Postgresql 8.3 and none of them were present anymore. I read on a forum that I could reinstall 8.3, but that person was working from Karmic not Lucid like I had. I ultimately had to:
- add the Karmic repositories to apt,
- shut down 8.4,
- install 8.3,
- go through the normal data dump procedure for upgrading Postgresql manually,
- uninstall 8.3,
- start 8.4,
- and load all the data again.
After that the CLI showed my databases were present so I relaunched the barcamp site, but it still wasn’t connecting. A little more googling revealed that Postgresql likes to increment the port number it listens on when there are two versions installed on the same machine. That was indeed the problem, so I changed the port number back, restarted it and Apache, and finally I’m back to where I started.
I should have known better than to trust Ubuntu to migrate the data, but even if I did that myself I’d never expect a minor version upgrade to listen on a different port when that upgrade disables the old version anyway.