数据库用户"postgres"不是安装用户 [英] database user "postgres" is not the install user
本文介绍了数据库用户"postgres"不是安装用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将Postgres从9.5升级到9.6.
brew upgrade postgresql
成功,但是运行时
I'm trying to upgrade postgres from 9.5 to 9.6.
brew upgrade postgresql
succeeds, but when running
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
时,它甚至变得更奇怪
when trying without -U postgres
at the end it gets even weirder
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集群显然是用
The old PostgreSQL cluster was obviously created with
initdb -U dimid
,但是新群集已分配了另一个超级用户.
but the new cluster was istalled with a different superuser.
您必须使用与旧集群相同的超级用户名来创建新集群.
You have to create the new cluster with the same superuser name as the old one.
这篇关于数据库用户"postgres"不是安装用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文