I have Windows Server 2003 machine on which I tried to install Postgres 9.2. At the end of the installation it pops a warning saying
Problem running post-install step. Installation may not complete correctly. Error reading file C:\Program Files\PostgreSQL\9.2\data\postgresql.conf
I checked for the file postgresql.conf
in C:\Program Files\PostgreSQL\9.2\data
and found that it does not exist.
I also found that there is not much under the data folder except for pg_log
folder which is also empty.
Any ideas on what I may be doing wrong?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With