postgres installation the database cluster initial

2019-06-25 14:23发布

I can't install Postgresql. I've tried everything:

  • I run the setup as Administrator.
  • I create a postgresql user an I add it to the Administrator group.
  • I install it directly on C:\postgresql.

but without any success. for information: I have windows 8

7条回答
一夜七次
2楼-- · 2019-06-25 14:26

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.

查看更多
We Are One
3楼-- · 2019-06-25 14:27

Problem solved:

run the setup as Administrador and use Windows 7 mode

查看更多
地球回转人心会变
4楼-- · 2019-06-25 14:31
  • First of all run the set-up as administrator.
  • Choose the installation folder inside program files( default)
  • But chose your data location outside from above folder to somewhere else ( c:\postgres data or something.)
查看更多
放荡不羁爱自由
5楼-- · 2019-06-25 14:33

Just don't use EDB installer. There is BigSQL alternative now.

查看更多
地球回转人心会变
6楼-- · 2019-06-25 14:33

I was facing the same issue on trying to install postgres 10.3.Running as the administrator didn't help me. But it got installed properly when i changed the installation directory from the default one which is inside Program Files.Instead i created a new folder inside the C drive and made it the installation directory.

查看更多
倾城 Initia
7楼-- · 2019-06-25 14:45

I was installing the Postgres version 9.5 (On windows 7 and using the DBEnterprise installer)... for me, the problem seems to be that I was selecting "POSIX" as Regional Configuration... But I tried with the "C" Regional Configuration, and the installation finished without any problem...

Also, I run the installer as Administrator!

查看更多
登录 后发表回答