Upgrading to postgresql 9.5 with homebrew is fairly simple. It just takes a few steps. This may seem like a lot, but depending on the size of your database, it should only take a few minutes to do all these steps.
Stop the postgresql server (if using launchctl):
Move the old postgresql directory
Create a new postgresql directory
Migrate the data to the 9.5 format
Note: You may need to change the versions above to whatever the current versions are.
That’s really all there is to it! You can
brew cleanup postgresql once you’ve verified that your server works using
psql and looking around your tables.