I can't install Postgresql. I've tried everything:
but without any success. for information: I have windows 8
it's 2019, and I still have the same issue with Postgres 11. Before that, I remove the current Postgres 9.6 (if I remember the version correctly), and attempt to install the new one Postgres 11, and got the issue. I have try these following approaches, but none of them work:
- Run installation as Administrator on every run -> failed
- Choose the default installation folder that the setup prompted (C:/Program Files/PostgresSQL/11), and the data folder reside at other place -> failed
- Install it on a place outside C:/ -> still failed
The only approach that I luckily found after scratching my head nearly the whole day is with this post
I would like to quickly recap the solution in case the the link expired
Solution:
- Uninstall PostgreSQL
- CMD: net user postgres /delete
- Control Panel -> User Accounts -> Configure advanced user profile properties -> delete all "Unknown User" instances that seem to be left from postgres
- Run > compmgmt.msc -> Local Users and Groups -> Users -> New User... -> User name: postgres, Password: postgres -> Create
- compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Add... -> Administrators -> OK
- copy postgresql-8.4.9-1-windows.exe to C:\
- runas /user:postgres cmd.exe -> cd \ -> postgresql-8.4.9-1-windows.exe -> installed successfully without errors. Checked data folder and confirmed files created successfully. (this mean you must run the installation with the created postgres user)
- compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Administrators -> Remove
- compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Add... -> Power Users -> OK
- Installed HM2 -> created db successfully
- Restarted computer -> HM2 runs properly (i.e. just to check postgresql service starts automatically)
Pro Tips:
To get an insight of the installation log, go to %TEMP% folder by searching for "%TEMP%" in the task bar, the log name would be bitrock_installer-xxx.log
. You would want to know what is going on to troubleshoot the issue faster.