在win7上面安装最新版的postgresql(postgresql-9.4.4-3)的时候遇到一个错误,
安装快结束的时候有一个错误提示框:
Failed to load sql modules into the database cluster
在postgresqltutorial上面找到对应的解决方法:
- Uninstall the PostgreSQL and delete the data directory in the installation folder.
- Create a new Windows user named postgres and add the it to the Administrators group.
- Restart your computer.
- Open cmd (command prompt) as the postgres command using the following command: runas /user:postgres cmd.exe
- A new window appears, you need to run the installer file from this window.
简单来说就是在windows里新建一个名字为“postgres”的用户,然后使用这个用户来允许安装程序。
需要注意的是默认runas命令会报错,要在计算机管理里面把service “Secondary Logo”由禁用改为自动