Postgres Installation Error reading file postgresql.conf
Asked Answered
D

4

8

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?

Demesne answered 24/5, 2013 at 8:7 Comment(0)
I
14

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"

Interlocution answered 22/6, 2013 at 10:10 Comment(1)
Installing Postgre 9.6 also encountering the same thing.Bicameral
S
6

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!

Selah answered 17/11, 2013 at 17:56 Comment(1)
I was having the same issue and this helped!Merv
C
1

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

Condyloma answered 14/1, 2019 at 0:13 Comment(0)
S
0

I was trying to install PostgreSQL v15.3.1 x64 on my company windows laptop and I was continuously getting below errors, even after multiple attempts of uninstalling and downgrading the software.

  1. Failed to load SQL modules into the database cluster.
  2. Problem running post-install step. Installation may not complete correctly Error reading file C:/Program Files/PostgreSQL/15/data/postgresql.conf

I could not find a C:/Program Files/PostgreSQL/15/data created after the installation is complete, hence I could not use the Postgres services.

Steps I used to resolve the issue.

  1. I was saving the installer into a oneDrive folder. Which I changed to C:/Postgres15 folder where I have admin privileges.
  2. Downloaded the installer exe, started the installer via CMD as admin

This resolved the issue! Now, I see the 'data' folder got created and I am able to start the service. Only warning I found this time is:

Problem running post-install step. Installation may not complete correctly The database cluster initialisation failed.

But now the services are starting.

warning 1 screenshot

Warning 2 Screenshot

Warning 3 Screenshot

Saberhagen answered 26/5, 2023 at 6:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.