我试图将9.5版本的postgres升级到9.6。 brew upgrade postgresql
成功,但运行数据库用户“postgres”不是安装用户
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
谢谢,我怎么能找出哪个用户创建一个集群? – dimid
你可以用'SELECT rolname FROM pg_roles WHERE oid = 10'来做到这一点,但这不是必须的。只需放下新簇,然后用'-U dimid'重新创建它。 –
谢谢,这个伎俩。出于好奇,“10”是指什么? – dimid