Postgres Installation Error reading file postgresql.conf

时光总嘲笑我的痴心妄想 提交于 2019-11-30 20:48:35

I recommend you to try following, it worked for me:

Make sure that the user that is logged in to the server has full control permissions for the postgres folder and it's sub-folders.

Run:

initdb -D <your new data folder>

and then:

pg_ctl -D <your new data folder> -l logfile start

If the problem continues, and postgres is installed under "Program Files", or the installation path contains a space character, try using a relative path for the data folder argument of pg_ctl. Such as: "..\data"

I just stumbled over another issue: If the user name of the currently active user contains a space character, postgres will fail to install its services to begin with, which results in the same error message. Be careful about changing the user name, as this might brick your windows installation. Instead, create a new user with admin privileges and install postgres from there, and everything will work smoothly.

On top of that, you will have to use a "runas /user:postgres cmd" to get a command window that's any good, or else initdb won't work either.

I realize this answer is months late, but it might help someone else!

Had this problem on Windows 10. For me the solution was to choose a locale different from [Default Locale] during install.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!