Fix PostgreSQL installation on Windows 10
Sometimes installing PostgreSQL is harder than expected…
I need to install PostgreSQL driver and management tools on my machine so i went to PostgreSQL download page, downloaded the x64 installer and launched the installation.
Unfortunately the installation was always failing at cluster creation.
In order to solve the issue i started inspecting the log file inside Windows Temp folder and i discovered that the issue was coming from this log line
Executing batch file ‘rad19A31.bat’…
initdb: error: The program “postgres” was found by “C:/Program Files/PostgreSQL/12/bin/initdb.exe”
but was not the same version as initdb.
After some Googling i found that the issue was that, probably due to a group policy rule I had this option checked
Unchecking and relaunching the installation solved the issue.
Hope this will save you some investigation time… 😊