4
如何在 Mac 上升級 PostgreSQL 並遷移資料
source link: https://blog.niclin.tw/2019/03/03/%E5%A6%82%E4%BD%95%E5%9C%A8-mac-%E4%B8%8A%E5%8D%87%E7%B4%9A-postgresql-%E4%B8%A6%E9%81%B7%E7%A7%BB%E8%B3%87%E6%96%99/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Nic Lin's Blog
喜歡在地上滾的工程師
今天寫 side project 時要啟動資料庫時遇到 postgres 版本問題
waiting for server to start....2019-03-02 12:45:08.851 EST [3310] FATAL: database files are incompatible with server
2019-03-02 12:45:08.851 EST [3310] DETAIL: The data directory was initialized by PostgreSQL version 10, which is not compatible with this version 11.2.
stopped waiting
pg_ctl: could not start server
Examine the log output.
brew postgresql-upgrade-database
Error: /usr/local/var/postgres.old already exists!
Remove it if you want to upgrade data automatically.
那就直接跟著刪掉吧
rm -rf /usr/local/var/postgres.old
再跑一次 brew postgresql-upgrade-database
沒意外就會看到
==> Upgraded postgresql data from 10 to 11!
==> Your postgresql 10 data remains at /usr/local/var/postgres.old
==> Successfully started `postgresql` (label: homebrew.mxcl.postgresql)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK