问题说明
使用pg_upgrade升级postgresql的时候
升级前检测 提示如下
Checking database user is the install user Only the install user can be defined in the new cluster. Failure, exiting
原因: 新的postgresql里有除了安装用户之外的用户 我的安装用户是postgres 所以在升级前 我应该保证只有postgres用户
执行操作删除用户后 好了
postgres=# drop user replicator;
DROP ROLE
postgres=# \du
List of roles
Role name | Attributes | Member of
------------+------------------------------------------------------------+-----------
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
删除完之后 再次检测 如下 已经ok了
... ...
Checking for prepared transactions ok
Checking for new cluster tablespace directories ok
*Clusters are compatible*