It's been more than three days, I have tried all the the solutions below,
postgres installation the database cluster initialization failed ( Postgresql Version 9.4.4 ) https://dba.stackexchange.com/questions/10241/postgresql-the-database-cluster-initialization-failed
Win 10 Postgresql 11 database cluster initialisation failed
https://dba.stackexchange.com/questions/28836/pg-install-the-database-cluster-initialisation-failed/28893 ...and many more.
I have tried almost everything out there.
Here's what I did for last few times while installing,
I followed these steps which most of the answers followed. I tried both installing normally in C:/Program Data/Postgres as well as installing separately by making a C:/Postgres folder.Nothing worked.
I am mentioning the error logs below.
Error running C:\Windows\System32\cscript //NoLogo "C:\Postgres/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Users\postgres.lenovo.000\AppData\Local\Temp/postgresql_installer_7f8b73b553" "C:\Postgres" "C:\Postgres\data" 5433 "DEFAULT" 0: Program ended with an error exit code Problem running post-install step. Installation may not complete correctly The database cluster initialisation failed.
I think the one below doesn't matter but still mentioning.
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-11 Base Directory. Setting variable iBaseDirectory to empty value Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-11 Branding. Setting variable iBranding to empty value Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-11 Version. Setting variable brandingVer to empty value Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-11 Shortcuts. Setting variable iShortcut to empty value [22:06:05] Using branding: PostgreSQL 11 Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-11 SB_Version. Setting variable sb_version to empty value Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-11 pgAdmin_Version. Setting variable pgadmin_version to empty value Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-11 CLT_Version. Setting variable clt_version to empty value Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-11 Data Directory. Setting variable server_data_dir to empty value Executing C:\Users\postgres.lenovo.000\AppData\Local\Temp/postgresql_installer_7c4186142f/temp_check_comspec.bat Script exit code: 0 Script output: "test ok"
Adding error images below
Are there any other alternatives for installing Postgres on Windows other than EDB ? Please help !!!.