2

I'm trying to install PostgreSQL 9.6.2 on my computer via installation package from EnterpriseDB.com. And everytime I get this error at the end:

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

I have done some googling and found a few "solutions" to this issue, but none of them worked for me. I'm using Windows 8.1, the "normal", not "Pro" edition. Most of these solutions were for Win 7 or Vista. Reason for installing PostgreSQL is using PostGIS for my attempt at creating map application.

I tried this one - https://cppoon.wordpress.com/2013/03/07/how-to-solve-problem-running-post-install-step-postgresql-window/

It's written for Win 7 Pro, so I had to do few things diffrently - for example compmgmt.msc doesn't contain anything about Users and Groups, so I went to lusrmgr.msc - but it said to me that it's not usable for my version of Windows (i would probably need Pro version). So i created new user via Settings, granted him admin rights via Control panel and tried to install it via CMD as written in the instructions. Well, didn't work, still got the same error.

Then I tried this - http://www.geekscribes.net/blog/2009/04/22/postgresql-database-cluster-initialisation-failed-solution/ .

It's for Windows Vista, but I gave it shot anyway. At first, I installed it in different folder outside Program Files (C:\Hry\postgres), got the same error. Then I tried to create user postgres there as written in the article, but when I wanted to assign rights to the folder, I got error with stm like this (my Win is not in english, so I'm translating it in the best way i can):

Error occured during attempt to use security information for:
C:\Hry\postgres\bin
Unable to load list of objects in the container. Access denied.

And the same one for every sub-folder of postgres. I still tried to re-run installation into the same folder as advised in the article, but nothing, still same error.

I'm including the last lines from install-postgresql log, if it will help someone with identifying where the problem is:

Called CreateDirectory(C:\Hry\postgres\data)...
Called CreateDirectory(C:\Hry\postgres)...
WScript.Network initialized...
strParentOfDataDirC:\Hry\postgres
logged in userPETR\Petr
Called AclCheck(C:\Hry\postgres\data)
Called IsVistaOrNewer()...
'winmgmts' object initialized...
Version:6.3
MajorVersion:6
Executing icacls to ensure the PETR\Petr account can read the path     C:\Hry\postgres\data
Executing batch file 'rad1F88F.bat'...
'icacls' is not recognized as an internal or external command,
operable program or batch file.

Called IsVistaOrNewer()...
'winmgmts' object initialized...
Version:6.3
MajorVersion:6
Ensuring we can write to the data directory (using icacls) to  PETR\Petr:
Executing batch file 'rad1F88F.bat'...
'icacls' is not recognized as an internal or external command, operable program or batch file.

Failed to ensure the data directory is accessible (C:\Hry\postgres\data)
Called Die(Failed to initialise the database cluster with initdb)...
Failed to initialise the database cluster with initdb

Script stderr:
 Program ended with an error exit code

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

At this point, I've spent a few hours on this and I'm running out of ideas. Any help would be greatly appreciated. Thanks very much in advance.

1
  • 1
    If you have a 64bit system you could try if you have better luck with bigsql. Either the gui version bigsql.org/postgresql/installers.jsp, or cli bigsql.org/package-manager.jsp. Otherwise a failed enterprise db installation can often be fixed by manually adjusting permissions, running initdb and registering the service. Commented Apr 16, 2017 at 6:23

2 Answers 2

1

I got the same problem before, solution for me is to install postgresql in usual place ("C:\Program Files") but the data in another drive that can be accessed by all Users on your computer.

Sign up to request clarification or add additional context in comments.

Comments

0

Install Postgresql in C:\Postgresql. It should work.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.