1

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

Cluster initialization error Another While clicking debug

Are there any other alternatives for installing Postgres on Windows other than EDB ? Please help !!!.

  • you found any solution? – Dragon Apr 11 '21 at 14:42
  • Nope, I had this problem when I was using windows 8.1, I currently use windows 10 and Postgres: 13 works like a charm. If I could go back 6 months ago, here's what I would say myself, "install Docker, install a pg container inside it, connect your application with the container". See: https://stackoverflow.com/questions/61759643/can-i-install-docker-by-windows-8-1 – Sudheer Tripathi Apr 11 '21 at 17:55

1 Answers1

0

I had this problem when I was using Windows 8.1, If I could go back 6 months ago here's what I would say myself, Install Postgres inside a Docker container and connect with it from your application. See - Can I install Docker by windows 8.1?

  • but if I use docker image of postgresql , then the client using my application need to install docker in his machine? I have created an nsis installer and user installs the app using a simple wizard , I cannot ask him to first install docker and then my app. Are you talking about the same? @sudheer Tripathi – Dragon Apr 12 '21 at 21:22
  • If it's okay to connect with a remote database from your client application then you can deploy the Postgres container remotely and connect with it from client application. – Sudheer Tripathi Apr 13 '21 at 06:07