加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgresql – 将Postgres.app 9.1升级到9.2,使得lc_collat??e值

发布时间:2020-12-13 16:24:11 所属栏目:百科 来源:网络整理
导读:我正在Macbook Pro(我的开发机器)上升级Postgres.app,运行时遇到错误: pg_upgrade -b /Users/foo/Library/PostgreSQL/9.1/bin/ -B /Applications/Postgres.app/Contents/MacOS/bin/ -d /Users/foo/Library/Application Support/Postgres/var-9.1/ -D /User
我正在Macbook Pro(我的开发机器)上升级Postgres.app,运行时遇到错误:
pg_upgrade -b /Users/foo/Library/PostgreSQL/9.1/bin/ 
           -B /Applications/Postgres.app/Contents/MacOS/bin/ 
           -d /Users/foo/Library/Application Support/Postgres/var-9.1/ 
           -D /Users/foo/Library/Application Support/Postgres/var

我得到的错误:

lc_collate cluster values do not match:  old "en_US",new "en_US.UTF-8"

我该如何纠正?

注意:我曾经让Postgres.app运行9.1,但我覆盖了它.我应该阅读/遵循的指示是:Upgrading Postgres.app.所以旧的bin已经消失,但我仍然有数据目录.相反,我下载了Postgres 9.1并将其安装在别处以使用bin目录升级并将我的数据移动到新的Postgres.

从 http://www.postgresql.org/docs/9.0/static/pgupgrade.html

Initialize the new PostgreSQL cluster

Initialize the new cluster using initdb. Again,use compatible initdb
flags that match the old cluster. Many prebuilt installers do this
step automatically. There is no need to start the new cluster.

当你运行initdb时,请确保–lc-collat??e = locale与旧的db相同,例如“en_us”

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读