Installation of PostgreSQL Error

Problem

While attempting to install PostgreSQL , the installation proceeded until almost completing and then displayed the following:

Warning
---------------------------
Problem running post-install step. Installation may not complete correctly
The database cluster initialization failed.


May also say:


failed to load sql modules into the database cluster


Solution

PostgreSQL has broken their installer, so attempts to install any version will end in this warning.  After giving the Users group Write access to the data directory, you will be able to successfully install PostgreSQL.

Steps to change the permissions on the data directory:

  1. Navigate to (or create) C:\Program Files\PostgreSQL\x.x\data.
  2. Give "Users" write permission
  3. Install PostgreSQL
  4. Remove write permission for "Users" on the data directory



© 2023 Foray, LLC - All Rights Reserved