-
-
Save joho/3735740 to your computer and use it in GitHub Desktop.
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X) | |
(if you aren't using version 9.1.5, change line 6 with the correct version) | |
1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
2. mv /usr/local/var/postgres /usr/local/var/postgres91 | |
3. brew update | |
4. brew upgrade postgresql | |
5. initdb /usr/local/var/postgres -E utf8 | |
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres | |
7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ | |
8. pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start | |
If you're using ruby, also: | |
gem pristine pg |
This saved me so much time. 👍 x 💯
+1 after looking for a night finally found the answer, thank you!
I understand nothing but it works perfectly from 9.2.4 to 9.3.1. thanks a lot.
Thanks a lot. This worked for me when upgrading from 9.2.4 to 9.3.2.
👍
After recently upgrading to OSX 10.9.4 my Postgres connection failed. I began to receive an error complaining about accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432". I had two versions of Postgres installed 9.2.1 and 9.3.4. After a day of trial and error I followed the above steps replacing with my versions and bingo, success. Thanks for the help!
You may have to create some directories as well. I ran into this issue, but Stack overflow to the rescue!
FINALLY! Thank you!
Thanks, great help
Saved the day, thanks!
Awesome. Thanks !
You sir are a boss. Thanks so much for this!
Thanks!
Thanks! Just updated 9.4 to 9.5.2 without any problems, just had to change the version numbers :)
Great, works to upgrade from 9.4.5 to 9.5.3
Thanks! worked great upgrading from 9.4.1 to 9.6.1
Thanks, works to upgrade from 9.5.3 to 9.6.1
Worked 1st time, thanks! 9.5.4 to 9.6.1.
👍 Me too. This is getting repetitive, but the repetitive thanks are well earned.
Worked for 9.5.3 to 9.6.2 - Thanks!
👍
Going from 9.6 to 10.1 on macOS (10.13.1) I had to specify the new local cluster storage for the pg_upgrade
call on step 6. To wit:
$ pg_upgrade -b /usr/local/Cellar/postgresql/9.6.3/bin -B /usr/local/Cellar/postgresql/10.1/bin -d /usr/local/var/postgres96 -D /usr/local/var/postgres
Thank you for this. Saved me a lot of time.
Thanks! Worked like charm when I upgrade from 9.6.5 to 10.1.
Thanks so much for this!
Thanks.. also work when upgrading 12 to 14
Huge thanks!