Skip to content

Instantly share code, notes, and snippets.

@paulsturgess
Forked from cjolly/pg.sh
Last active December 16, 2015 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulsturgess/5429234 to your computer and use it in GitHub Desktop.
Save paulsturgess/5429234 to your computer and use it in GitHub Desktop.
pg_ctl -D /usr/local/var/postgres stop -s -m fast
launchctl unload -w ~/Library/LaunchAgents/org.postgresql.postgres.plist
rm ~/Library/LaunchAgents/org.postgresql.postgres.plist
mv /usr/local/var/postgres/ /usr/local/var/postgres-9.0.4/
brew update
brew upgrade postgresql
cp /usr/local/Cellar/postgresql/9.1.3/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
sudo sysctl -w kern.sysv.shmall=65536
sudo sysctl -w kern.sysv.shmmax=16777216
sudo vim /etc/sysctl.conf
kern.sysv.shmall=65536
kern.sysv.shmmax=16777216
initdb /usr/local/var/postgres
pg_upgrade -d /usr/local/var/postgres-9.0.4/ -D /usr/local/var/postgres -b /usr/local/Cellar/postgresql/9.0.4/bin -B /usr/local/Cellar/postgresql/9.1.3/bin
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
vacuumdb --all --analyze-only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment