PostgreSQL installs with errors, even as Administrator

When I first tried to install PostgreSQL, it failed. I assumed the problem was caused by not running the installer with administrative privileges.

I uninstalled PostgreSQL and tried again, this time running the installer as Administrator.

The installation has failed again, this time with a different set of errors. A dialog box appeared at the end of the installation:

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

From the log file:

Error running cscript //NoLogo "C:Program FilesPostgreSQL9.1/installer/server/initcluster.vbs" "postgres" "postgres" "****" "C:Program FilesPostgreSQL9.1" "C:Program FilesPostgreSQL9.1data" 5432 "DEFAULT" : Program ended with an error exit code
Problem running post-install step. Installation may not complete correctly
 The database cluster initialisation failed.

The log provides more detail. This first error looks like it’s passing a bad parameter to icacls.

Ensuring we can read the path C:Program FilesPostgreSQL9.1 (using icacls) to Sco:
    Executing batch file 'rad86B3F.bat'...
    Invalid parameter "Sco:(RX)(NP)"

The second error looks like a permissions issue.

fixing permissions on existing directory C:/Program Files/PostgreSQL/9.1/data ... initdb: could not change permissions of directory "C:/Program Files/PostgreSQL/9.1/data": Permission denied

The first error could be as a result of the second. I’ll investigate the script initcluster.vbs to see if I can work out what’s going wrong.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s