Encountered the following two issues:
One is an error during installation:
Problem running post-install step. Installation may not complete correctlyThe database cluster initialisation failed.
The other is an error during initialization:
The program "postgres" was found by "initdb" but was not the same version as initdb.
The reason for the problem is that the encoding format of cmd has been modified before.
Solution:
-
Press win+R
-
Enter regedit
-
Find
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
-
Set Autorun to empty
-
Reinstall Postgresql