gpt4 book ai didi

macos - 数据库用户 "postgres"不是安装用户

转载 作者:行者123 更新时间:2023-11-29 11:28:24 31 4
gpt4 key购买 nike

我正在尝试将 postgres 从 9.5 升级到 9.6。brew upgrade postgresql 成功,但是运行时

pg_upgrade -b /usr/local/Cellar/postgresql/9.5.3/bin/ -B /usr/local/Cellar/postgresql/9.6.1/bin/ -d /usr/local/var/postgres -D /usr/local/var/postgres9.6 -U postgres

我得到一个错误

Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is the install user
database user "postgres" is not the install user
Failure, exiting

如果最后不使用 -U postgres 会变得更奇怪

Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is the install user ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for reg* system OID user data types ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for roles starting with 'pg_' ok
Creating dump of global objects ok
Creating dump of database schemas
ok
Checking for presence of required libraries ok
Checking database user is the install user
database user "dimid" is not the install user

那怎么会

Checking database user is the install user                  ok

最佳答案

旧的 PostgreSQL 集群显然是用

initdb -U dimid

但是新集群安装了不同的 super 用户。

您必须使用与旧集群相同的 super 用户名创建新集群。

关于macos - 数据库用户 "postgres"不是安装用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41854387/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com