2

While installing PostgreSQL I keep getting the message:

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

This seems to prevent me from using PGadmin correctly.

In the install log I have found the following section which seems to indicate where things went wrong.

I haven't been able to find a solution to this problem.

Executing batch file 'rad7C33E.bat'...
 The program "postgres" was found by "C:/Program Files/PostgreSQL/11/bin/initdb.exe"
but was not the same version as initdb.
Check your installation.
Called Die(Failed to initialise the database cluster with initdb)...
Failed to initialise the database cluster with initdb
Script stderr:
 Program ended with an error exit code
Error running cscript //NoLogo "C:\Program Files\PostgreSQL11円/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Users\JesseDanckaarts\AppData\Local\Temp/postgresql_installer_6f373c7c91" "C:\Program Files\PostgreSQL11円" "C:\Program Files\PostgreSQL11円\data" 5432 "Dutch,Netherlands" 0: Program ended with an error exit code
Problem running post-install step. Installation may not complete correctly
 The database cluster initialisation failed.
Executing icacls "C:\Users\JesseDanckaarts\AppData\Local\Temp/postgresql_installer_cb3c83cf49" /inheritance:r
Script exit code: 0

I have tried the following without luck so far:

and many more!

If anyone knows what could be the problem I'd be very grateful!

asked Sep 2, 2019 at 14:56
5
  • Looks like there is another postgres executable on the PATH. Deinstall all other PostgreSQL installations and make sure there is no other postgres executable around. Commented Sep 2, 2019 at 15:02
  • You don't need to install Postgres in order to use pgAdmin. If you just want to connect to an existing server with pgAdmin, it's enough to download and install that: pgadmin.org/download Commented Sep 2, 2019 at 15:04
  • @LaurenzAlbe I have already tried uninstalling and even manually removing all leftovers. Commented Sep 2, 2019 at 15:08
  • @a_horse_with_no_name I will be running a local database to use with Mendix. Commented Sep 2, 2019 at 15:10
  • You wrote "prevent me from using PGadmin" so I assumed you just want to use pgAdmin Commented Sep 2, 2019 at 19:22

1 Answer 1

6

Cross posting from StackOverflow:

I've just struggled with this for several hours, so I'm posting this for anyone else who winds up here.

Initially, all I could find were two bug reports on the pgsql-bugs mailing list:

BUG #15856: The program "postgres" was found by "initdb" but was not the same version as initdb.

BUG #15970: Db initialization error - initdb.exe and postgres not same version

The specific symptoms are:

The program "postgres" was found by ".../initdb.exe" but was not the same version as initdb.

and although the versions match, you get this:

C:\Program Files\PostgreSQL11円\bin>postgres -V
WARNING: 01000: could not determine encoding for locale
"<some encoding>.utf8": codeset is "CPutf8"

If these are your symptoms, the issue is that you have your region/language settings set to use UTF-8 (beta setting). This causes problems with lots of programs, and PostgreSQL is one of them. Disable this and re-install and you should be fine.

UTF8 Region Settings screenshot

answered Sep 11, 2019 at 22:55
3
  • 1
    This is godlike answer! You just stopped my 2 hours of setup mayhem. Guess what... even in postgres 12, this can still be reproduced. Did you file this into enterprisedb? Commented Oct 27, 2019 at 6:58
  • Still the same in 12.2.2. Been trying to get it installed for hours, and if I hadn't found this answer... Commented Mar 25, 2020 at 9:55
  • Thank you so much for the answer! This workaround worked flawlessly when upgrading from 12 to 13. I would never have thought about it. Commented Oct 4, 2020 at 19:12

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.