Skip to content

Instantly share code, notes, and snippets.

@michaelabon
Last active August 29, 2015 14:20
Show Gist options
  • Save michaelabon/23ebee22316c97f10681 to your computer and use it in GitHub Desktop.
Save michaelabon/23ebee22316c97f10681 to your computer and use it in GitHub Desktop.
Installing Postgres on Mac OS X 10.10 (Yosemite)
brew update
brew install postgresql

Yosemite appears to delete folders that postgres needs.

mkdir -p /usr/local/var/postgres/{pg_tblspc,pg_twophase,pg_stat_tmp}/
touch /usr/local/var/postgres/{pg_tblspc,pg_twophase,pg_stat_tmp}/.keep

If you have trouble starting postgres, try setting it up first.

rm -rf /usr/local/var/postgres/*
initdb /usr/local/var/postgres -E utf8
createuser --interactive postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment