PostgreSQL installation on Windows 2008 Server R2
During installtion of PostgreSQL 9.2.2-1 server in a Windows 2008 server R2 , I got the problem:
Warning: Problem running post-install step. Installation may not complete correctly
The database cluster initialisation failed.
When I try to manually run initDB.exe in order to see more meaningful error messages , it then returns “permission denied” error. But actually , the “postgres” user has already granted Read Write permission in “C:\PostgreSQL”
C:\PostgreSQL\9.2\bin>”C:\PostgreSQL\9.2\bin\initdb.exe” –encoding=UTF-8 -A md
5 -U “postgres” -D “C:\PostgreSQL\9.2\data” -W –no-locale
使用者 “administrator” 將會成為資料庫系統檔案和伺服器行程的擁有者。The database cluster will be initialized with locale “C”.
預設的文本搜尋設定將設為 “english”。修正現有目錄 C:/PostgreSQL/9.2/data 的權限…initdb: 無法修改目錄 “C:/PostgreSQL/9.2/data” 的權限: Permission denied
To fix this , I have “temporarily granted the local “postgres” user administrator rights . Then logon windows 2008 server R2 as local user “postgres”, and run the installation again and it will complete successfully . After that , remove the postgres from Administrators group. Then PostgreSQL server will run as services automatically even after reboot.
I have tested with PostgreSQL 8.4.15 , 9.0.11 , the above problem and solution are also valid.