I'm in the middle of a big upgrade to my new Software as a Service company - upgrading it from being just for gourmet fresh-grind coffee machines to supporting any kind of vending machine. This change has required a lot of refactoring and updating of the database. To make sure this is all working properly, I set up a staging server on Heroku last night. This lets me test out the migrations and data update scripts without impacting the live system.
This has been working great until I tried copying the staging database back down to my local machine to test some fixes. I got this message:
I'm using Heroku's handy Postgres.app and I discovered that there was indeed a new version out, supporting Postgresql 9.4. So I downloaded and fired it up. It uses an entirely new data directory and didn't migrate over my local databases, which would have been more annoying except my local DBs are just for development.
I was still getting the "server version mismatch" error, though. Turns out the new Postgres.app doesn't update my $PATH to where its utilities live - and it turns out that this is different from where it was set in the previous version.
You need to update your .bashrc (or whatever) file to include this:
Then restart your terminal and you can get back to your regular work.