patternsqlMajor
PostgreSQL: The database cluster initialization failed
Viewed 0 times
postgresqlthedatabasefailedinitializationcluster
Problem
Both
I ran postgresql-9.1.2-1-windows.exe from postgres user as admin. Target
Every way I try, I get "The database cluster initialization failed."
Questions
I am trying to setup PostGIS to work with GeoDjango.
I was able to manually install PostGIS. New to PostgreSQL and I am having a crisis of confidence over all of this. Coming from MySQL to PostgreSQL for the first time.
Pertinent log output from C:\Users\Larry\AppData\Local\Temp\install-postgresql.log:
Suggestions?
C:\PostgreSQL and C:\PostgreSQL\data have postgres user with full access and admin rights.I ran postgresql-9.1.2-1-windows.exe from postgres user as admin. Target
C:\PostgreSQLEvery way I try, I get "The database cluster initialization failed."
Questions
- Is it OK to run everything w/o being a Windows Service?
- Is there a work-around to install as Windows Service?
I am trying to setup PostGIS to work with GeoDjango.
I was able to manually install PostGIS. New to PostgreSQL and I am having a crisis of confidence over all of this. Coming from MySQL to PostgreSQL for the first time.
Pertinent log output from C:\Users\Larry\AppData\Local\Temp\install-postgresql.log:
WScript.Network initialized...
Called IsVistaOrNewer()...
'winmgmts' object initialized...
Version:6.1
MajorVersion:6
Ensuring we can read the path C: (using icacls) to Larry:
Executing batch file 'radA3CF7.bat'...
Output file does not exists...
Called IsVistaOrNewer()...
'winmgmts' object initialized...
Version:6.1
MajorVersion:6
Ensuring we can read the path C:\PostgreSQL (using icacls) to Larry:
Executing batch file 'radA3CF7.bat'...
Output file does not exists...
Called IsVistaOrNewer()...
'winmgmts' object initialized...
Version:6.1
MajorVersion:6
Ensuring we can read the path C:\PostgreSQL\data (using icacls) to Larry:
Executing batch file 'radA3CF7.bat'...
Output file does not exists...
Called IsVistaOrNewer()...
'winmgmts' object initialized...
Version:6.1
MajorVersion:6
Ensuring we can write to the data directory (using icacls) to Larry:
Executing batch file 'radA3CF7.bat'...
Output file does not exists...
Failed to ensure the data directory is accessible (C:\PostgreSQL\data)
Executing batch file 'radA3CF7.bat'...
Output file does not exists...
Called Die(Failed to initialise the database cluster with initdb)...
Failed to initialise the database cluster with initdbSuggestions?
Solution
I had the same issue installing 9.1.4 on Windows 7. I managed to find a solution online that worked.
The steps I followed are:
-
Delete the postgres user if it still exists.
-
Create the postgres user with a password you can remember
-
Add the postgres user to the Administrators group
-
Add the postgres user to the Power Users group
-
Run a command window as the postgres user
-
Run the install file from within the command window.
This should run the installation successfully.
-
Remove the postgres user from the Administrators group.
The steps I followed are:
- Uninstall PostgreSQL
-
Delete the postgres user if it still exists.
net user postgres /delete-
Create the postgres user with a password you can remember
net user /add postgres -
Add the postgres user to the Administrators group
net localgroup administrators postgres /add-
Add the postgres user to the Power Users group
net localgroup "power users" postgres /add-
Run a command window as the postgres user
runas /user:postgres cmd.exe-
Run the install file from within the command window.
C:\Download\postgresql-9.1.4-1-windows.exeThis should run the installation successfully.
-
Remove the postgres user from the Administrators group.
net localgroup administrators postgres /deleteCode Snippets
net user postgres /deletenet user /add postgres <password>net localgroup administrators postgres /addnet localgroup "power users" postgres /addrunas /user:postgres cmd.exeContext
StackExchange Database Administrators Q#10241, answer score: 22
Revisions (0)
No revisions yet.