Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running Windows 7 64bit. It complains with

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

I tried installing Postgresql server, 64bit and 32bit. It fails at the end of the install process.

The install-postgresql.log file contains:

Executing cscript //NoLogo "C:\Program Files (x86)\PostgreSQL\9.1/installer/server/initcluster.vbs" "postgres" "postgres" "****" "C:\Program Files (x86)\PostgreSQL\9.1" "C:\postgresql-data" 5432 "DEFAULT"
Script exit code: 1

Script output:
 WScript.Shell Initialized...
Scripting.FileSystemObject initialized...

WScript.Network initialized...
Called IsVistaOrNewer()...
    'winmgmts' object initialized...
    Version:6.1
    MajorVersion:6
Ensuring we can read the path C: (using icacls) to Krystian:
    Executing batch file 'rad8D950.bat'...
    Invalid parameter "Krystian:(RX)(NP)"

Called IsVistaOrNewer()...
    'winmgmts' object initialized...
    Version:6.1
    MajorVersion:6
Ensuring we can read the path C:\postgresql-data (using icacls) to Krystian:
Called IsVistaOrNewer()...
    'winmgmts' object initialized...
    Version:6.1
    MajorVersion:6
Ensuring we can write to the data directory (using icacls) to  Krystian:
Failed to ensure the data directory is accessible (C:\postgresql-data)
Called Die(Failed to initialise the database cluster with initdb)...
Failed to initialise the database cluster with initdb

I tried the following variants:

  • installing 64bit PostgreSQL on Windows 7 64 bit

  • installing 32bit PostgreSQL on Windows 7 64 bit

  • creating a directory C:\postgresql-data\ and using it as the data dir to avoid storing data in Program Files

It is a fairly fresh box I am setting up. I have Kaspersky Internet Security running on it, but tried installing postgres with Kaspersky enabled and disabled, to no avail.

Any help would be highly appreciated.

share|improve this question

closed as off topic by SvW, EEAA, WesleyDavid, Ward, John Gardeniers Feb 27 '12 at 1:43

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

I have found an acceptable solution:

http://forums.enterprisedb.com/posts/list/1891.page

Please see the answer by Sampath+Rachakonda.

The short answer is that you cannot install Postgresql to a directory inside of Program Files.

The solution is to do an install to, say C:\Postgresql\. After the install, you will get the same error. After the install, empty out the C:\Postgresql\ and set its permission to allow the postgres user full control (or give it full ownership). Do the install again. All should work well.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.