Keywords: PostgreSQL - Windows - Technical issue - Other
I have tried MySQL based stacks for Windows many times and cannot recall a major issue with MySQL. A few days ago I decided to try PostgreSQL on Windows 10 and it turned out to be a nightmare.
I have tried at least three stacks shipping with PostgreSQL, including WAPP, Django, and eXo Platform with the same result. The installation process is getting stuck at “Waiting for postmaster” for quite bit and then fails with an error indicating a failure to connect to the PostgreSQL server.
I started troubleshooting the issue. I realized that the reason of that error was due to the fact that the installed PostgreSQL service was defective: it would fail to start, and the error message reported by Windows was as often happens useless.
After repeated attempts it appears that the problem is associated with runtime MS VC++ redistributables 14.x (2015-2019). Simultaneously, I discovered that these family of MS VC++ redistributables 14.x is a total mess. Starting at some level Y, the installers for versions >=14.Y fail to install, and I could not figure out the nature of this problem.
PostgreSQL has a dependency on MS VC++ redistributables 14.X, with the exact minimum version X being unknown to me. I can install version 14.11…, and initially Bitnami PostgreSQL stacks started working. However, a day later the installation process fails as before.
Early in the troubleshooting process, I also downloaded an official PostgreSQL 11.6 distro for Windows (build 188.8.131.5243). It had a similar issue initially, but after I tried different versions of MS VC++ redistributables 14.X, the largest version I could install fixed the issue with this build. (In fact, I initially downloaded PostgreSQL 12.3 and it worked just fine right away. It was the 11.6 distro that failed to work initially.) Build 184.108.40.20643 still works just fine after multiple install/uninstall cycles, but Bitnami stacks, which use and older build 220.127.116.1116, fail to install.