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
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.