Sample Header Ad - 728x90

Win Server 2016 - PostgreSQL 15 and 16 Install Errors - Failed to Load SQL Modules into Database Clusters

0 votes
1 answer
20 views
*Note that PG10 was installed on this server. Prior to installing the new version, I stopped and disabled the PG10 service.* Here's the OS version of the server in question: enter image description here I used the EDB installers linked from the main postgres site: https://www.postgresql.org/download/windows/ I was unable to install PG16 on a client's system due to the error: Failed to Load SQL Modules into Database Clusters which occurred near the end of installation. I have installed PG16 on Win10 and Win11 before (as well as some other Win Server OS's on client systems - but I'm not sure exactly what server versions) and have not run into this issue before. After I clicked through the error and the installation completed, the postgres service refused to start with Error 1067: The process terminated unexpectedly I tried a lot of suggestions I found online (many from this post ) Here's a full list of what I tried: - Rebooting the server - Installing as admin - Installing outside of the Program Files folder (C:\PostgreSQL) - Creating the PostgreSQL and data folders prior to install and giving full permissions to: User Group, Admin Group and the NETWORK SERVICE user. - Setting the service user to Local System, and also the local admin. - Using the default password ("postgres") in the installer - Explicitly setting the locale to English US in the installer I also tried to manually patch the install with some commands I found online: (initialize the DB cluster) initdb -D "C:\PostgreSQL\16\data" -U postgres -A password --pwfile=passwd.txt (simulate postgres service run) "C:\PostgreSQL\16\postgres.exe" -D "C:\PostgreSQL\16\data" The command to init the DB succeeded, but when I tried the second command (simulate service), I immediately got a generic Windows "PostgreSQL has stopped working" error. This is what the event viewer showed: > Faulting application name: postgres.exe, version: 16.0.4.0, time stamp: 0x66b37331 Faulting module name: ucrtbase.dll, version: 10.0.14393.7426, time stamp: 0x66f600f9 Exception code: 0xc0000409 Fault offset: 0x000000000006c9e8 Faulting process id: 0x1b38 Faulting application start time: 0x01dbfc1356b9793c Faulting application path: C:\Program Files\PostgreSQL\16\bin\postgres.exe Faulting module path: C:\Windows\System32\ucrtbase.dll Report Id: c29be876-cf53-4689-b6df-459d3bc7df35 Faulting package full name: Faulting package-relative application ID: Searching online suggested this might be due to issues with the server's runtime libraries, but this was starting to go way over my head. We tried installing PG15 and got the same errors. Eventually we tried going all the way back to PG12, and that worked. I know postgres made significant changes between 12 and 13. PG12 is EOL now, so it's not ideal to use that instead of a newer version, but this was the latest version we could get working. We will likely keep it as is for now, but I would appreciate any further insights or troubleshooting tips in case we decide to revisit the upgrade, or in case this happens with another client. Any help is much appreciated!
Asked by user2437443 (145 rep)
Aug 1, 2025, 07:15 PM
Last activity: Aug 2, 2025, 11:51 AM