I'm trying to install postgreSQL on my windows 10 computer for the first time. I got two errors at the end of the installation
1) a non-fatal error occured during cluster initialisation. please check the installation log in C:\users\abc\AppData\Local\Temp for details
2) problem running post-install step. Installation may not complete correctly.Failed to start the database-server.
I also tried a number of other (but very dated) solutions to similar problems users experienced such as moving my data directory outside of the Postgres directory entirely. Most of these solutions date back and don't seem to work anymore.
The one that seemed closest to working is [PostgreSQL Database Cluster Initialisation Failed Solution][1]
However, I can't find "postgres" as a user. I get an error saying: "An object named "postgres" cannot be found. Check the selected object types and location for accuracy and ensure that you typed the object name correctly, or remove this object from the selection."
Does anybody have any updated solutions/tips for this?
Please see the logs: I have added some more logs below this.
> Log started 09/08/2017 at 15:35:34
Preferred installation mode : qt
Trying to init installer in mode qt
Mode qt successfully initialized
Executing C:\Users\skum\AppData\Local\Temp/postgresql_installer_c42ee2159f/temp_check_comspec.bat
Script exit code: 0
Script output:
"test ok"
Script stderr:
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Data Directory. Setting variable iDataDirectory to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Service ID. Setting variable iServiceName to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Service Account. Setting variable iServiceAccount to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Super User. Setting variable iSuperuser to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Branding. Setting variable iBranding to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 DisableStackBuilder. Setting variable iDisableStackBuilder to empty value
[15:35:38] Existing base directory: C:\Users\skum\postgres_inst
[15:35:38] Existing data directory:
[15:35:38] Using branding: PostgreSQL 9.6
[15:35:38] Using Super User: postgres and Service Account: NT AUTHORITY\NetworkService
[15:35:38] Using Service Name: postgresql-x64-9.6
Executing cscript //NoLogo "C:\Users\skum\AppData\Local\Temp\postgresql_installer_c42ee2159f\prerun_checks.vbs"
Script exit code: 0
Script output:
The scripting host appears to be functional.
Script stderr:
Executing C:\Users\skum\AppData\Local\Temp\postgresql_installer_c42ee2159f\vcredist_x64.exe /passive /norestart
Script exit code: 0
Script output:
Script stderr:
Executing C:\Users\skum\AppData\Local\Temp\postgresql_installer_c42ee2159f\vcredist_x86.exe /passive /norestart
Script exit code: 0
Script output:
Script stderr:
Executing C:\Users\skum\AppData\Local\Temp\postgresql_installer_c42ee2159f\getlocales.exe
Script exit code: 0
Logs Part 1:
Failed to ensure the data directory is accessible (C:\Users\skum\postgresqlData)
Executing batch file 'radB66AD.bat'...
The files belonging to this database system will be owned by user "skum".
This user must also own the server process.
The database cluster will be initialized with locale "English_United States.1252".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory C:/Users/skum/postgresqlData ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... windows
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
"C:\Users\skum\postgres_inst\bin\pg_ctl" -D "C:\Users\skum\postgresqlData" -l logfile start
Reading: C:\Users\skum\postgresqlData\postgresql.conf exists...
Writing: C:\Users\skum\postgresqlData\postgresql.conf exists...
Called AclCheck(C:\Users\skum\postgresqlData)
Called IsVistaOrNewer()...
'winmgmts' object initialized...
Version:10.
MajorVersion:10
Executing icacls to ensure the NT AUTHORITY\NetworkService account can read the path C:\Users\skum\postgresqlData
Executing batch file 'radB66AD.bat'...
'icacls' is not recognized as an internal or external command,
operable program or batch file.
Called IsVistaOrNewer()...
'winmgmts' object initialized...
Version:10.
MajorVersion:10
Granting service account access to the data directory (using icacls) to NT AUTHORITY\NetworkService:
Executing batch file 'radB66AD.bat'...
'icacls' is not recognized as an internal or external command,
operable program or batch file.
Failed to grant service account access to the data directory (C:\Users\skum\postgresqlData)
initcluster.vbs ran to completion
Script stderr:
Program ended with an error exit code
Error running cscript //NoLogo "C:\Users\skum\postgres_inst/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Users\skum\postgres_inst" "C:\Users\skum\postgresqlData" 5432 "DEFAULT" 0: Program ended with an error exit code
Configuring database server startup...
Executing cscript //NoLogo "C:\Users\skum\postgres_inst\installer\server\startupcfg.vbs" 9.6 "NT AUTHORITY\NetworkService" "****" "C:\Users\skum\postgres_inst" "C:\Users\skum\postgresqlData" "postgresql-x64-9.6"
Script exit code: 0
Script output:
startupcfg.vbs ran to completion
Script stderr:
Creating menu shortcuts...
Executing cscript //NoLogo "C:\Users\skum\postgres_inst\installer\server\createshortcuts.vbs" 9.6 "postgres" 5432 "PostgreSQL 9.6" "C:\Users\skum\postgres_inst" "C:\Users\skum\postgresqlData" "postgresql-x64-9.6"
Script exit code: 0
Script output:
Start FixupFile(C:\Users\skum\postgres_inst\scripts\serverctl.vbs)...
Opening file for reading...
Closing file (reading)...
Replacing placeholders...
Opening file for writing...
Closing file...
End FixupFile()...
Start FixupFile(C:\Users\skum\postgres_inst\scripts\runpsql.bat)...
Opening file for reading...
Closing file (reading)...
Replacing placeholders...
Opening file for writing...
Closing file...
End FixupFile()...
createshortcuts.vbs ran to completion
Script stderr:
Starting the database server...
Executing cscript //NoLogo "C:\Users\skum\postgres_inst\installer\server\startserver.vbs" postgresql-x64-9.6
Script exit code: 1
Script output:
Starting postgresql-x64-9.6
Failed to start the database server (2)
Script stderr:
Program ended with an error exit code
Error running cscript //NoLogo "C:\Users\skum\postgres_inst\installer\server\startserver.vbs" postgresql-x64-9.6: Program ended with an error exit code
Problem running post-install step. Installation may not complete correctly
Failed to start the database server.
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
Creating uninstaller 100%
Installation completed
Log finished 09/08/2017 at 15:41:35