brew will probably install the latest version of postgresql, but it's preferable to have the same version as on production to avoid issues with syntax incompatibility. Current version on the production server is 9.3.
Procedure for Mac/Linux
From the Terminal app:
brew install postgresql
brew services start postgresql
Troubleshooting. In some cases, there is might be an issue when starting postgresql:
sh: 1: list: not found Error: Failure while executing: load -w /home/user/Library/LaunchAgents/homebrew.mxcl.postgresql.plist