Postgres psql: 致命错误: 角色 "postgres" 不存在

问题再现

当前环境:

postgresql: 11.5
windows 10 企业版LTSC   64位

当运行"C:Program FilesPostgreSQL11scripts unpsql.bat" 的时候,发现了这个错误。

原因

原因是:PostgreSQL角色没有被创建。运行命令:createuser -s -r postgres 即可。

如果找不到createuser这个命令,可以在PostgreSQL11in中找到。添加到系统path中,或cd到这个文件夹再运行。

原文地址:https://www.cnblogs.com/heenhui2016/p/11613384.html