我想知道这个命令是否足以更新我用brew安装的PostgreSQL数据库,或者我是否需要在之前或之后运行一些额外的命令:
brew postgresql-upgrade-database
提前致谢。
我还没有尝试过,在这样做之前我想确定它是合适的命令
mv /usr/local/var/postgres /usr/local/var/postgresql@14
brew services install postgresql@16
/usr/local/opt/postgresql@16/bin/pg_upgrade -b /usr/local/opt/postgresql@14/bin -B /usr/local/opt/postgresql@16/bin -d /usr/local/var/postgresql@14 -D /usr/local/var/postgresql@16
brew uninstall postgresql@14
postgresql@16
mv /usr/local/var/postgres /usr/local/var/postgresql@14
brew services install postgresql@16
/opt/homebrew/Cellar/postgresql@16/16.3/bin/pg_upgrade -b /opt/homebrew/Cellar/postgresql@14/14.12/bin -B /opt/homebrew/Cellar/postgresql@16/16.3/bin -d /opt/homebrew/var/postgresql@14 -D /opt/homebrew/var/postgresql@16
brew uninstall postgresql@14
postgresql@16