postgresql – 如何升级postgresl数据库?不兼容错误
我通过Homebrew安装了
postgresql.
升级后我有以下问题: 致命:数据库文件与服务器不兼容 有关如何升级的任何提示?我尝试了以下方法: $pg_upgrade -d /usr/local/var/postgres/ -D /usr/local/var/postgres -b /usr/local/Cellar/postgresql/9.0.4/bin -B /usr/local/Cellar/postgresql/9.1.2/bin 它没用.这是输出. Performing Consistency Checks Checking current,bin,and data directories ok Checking cluster versions This utility can only upgrade to PostgreSQL version 9.1. Failure,exiting 错误.
对于我在OS X上使用Homebrew,就像这样.
>使用Homebrew安装新的postgres(开始收到错误)> mv /usr/local / var / postgres /usr/local/var/postgres.old> initdb -D /usr/local / var / postgres> pg_upgrade -b /usr/local/Cellar/postgresql/9.0.4/bin -B /usr/local/Cellar/postgresql/9.1.2/bin -d /usr/local/var/postgres.old -D / usr /本地的/ var / Postgres的> ./delete_old_cluster.sh(当您完成上述步骤时,将在当前目录中自动为您创建此脚本)> rm delete_old_cluster.sh (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |