Postgresql 11.5 installation problem
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\PostgreSQL\11\bin&gt;postgres -V
WARNING:  01000: could not determine encoding for locale
"&lt;some encoding&gt;.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.