在使用Homebrew进行PostgreSQL 9.4升级的备忘录中

从9.3.0升级到9.4.0。

psql --version
=> psql (PostgreSQL) 9.3.0
brew update
brew upgrade postgresql
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
mv /usr/local/var/postgres /usr/local/var/postgres93
initdb /usr/local/var/postgres -E utf8
pg_upgrade \
  -b /usr/local/Cellar/postgresql/9.3.0/bin \
  -B /usr/local/Cellar/postgresql/9.4.0/bin \
  -d /usr/local/var/postgres93 \
  -D /usr/local/var/postgres
cp /usr/local/Cellar/postgresql/9.4.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
psql --version
=> psql (PostgreSQL) 9.4.0
广告
将在 10 秒后关闭
bannerAds