0
votes

I'm trying to install PostgreSQL 10 on windows 10. The Postgres installation tutorial tells me to create a new Windows 10 administrator named postgres.

this is the procedure:

  1. Uninstall PostgreSQL and delete the data directory in the installation folder.
  2. Create a new Windows user named postgres and add it to the Administrators group.
  3. Restart your computer.
  4. Open cmd (command prompt) as the postgres command using the following command: runas /user:postgres cmd.exe 5-A new window appears, you need to run the installer file from this window.

But, at point 2, when I try to create a user named postgres, Windows does not accept the user name postgres, does someone knows the solution?

thank you.

enter image description here

1
There is no need to create a user named postgres to install Postgres on Windows. That has not been necessary for years now. It seems your "Postgres tutorial" is out of date. Just run the installer, it will use a pre-defined, built-in account to run the servicea_horse_with_no_name
but if i do not, the installer has an error "Failed to load sql modules into the database cluster", and also, i m really wondering why i cannot use this username to create a user.Greg Artisi
after some research, i found that i have already a user called postgre in the system as a host, but i cannot delete it, i can see it in the cmd using " net user", but when i try to delete it, windows tells me ihave not the autorisation.i dont understand because i am admin and i cannot delete a host.Greg Artisi
Then apparently you don't do that steps as Administrator (deleting the postgres user or installing Postgres). You need to start the installer with administrator privileges.a_horse_with_no_name

1 Answers

1
votes

after some research, i found that i have already a user called postgres in the system as a host, but i cannot SEE it from windows parameters.

I can see it in the cmd using net user, but when I try to delete it, windows tells me I have not the authorisation.

So, i went to Control Panel > System. > Advanced system settings Click the Settings button under the User Profiles sub-section

from here I thought I could delete this user.

But, when I try again to create it, I still can not! net user still shows me this user "postgres"

enter image description here

in the end, I found I had to use the windows PowerShell admin command prompt which is different from the classic command prompt, and from there, it worked!

I used the command net user postgres /delete and this user has been deleted.

now I can reinstall postgresql!

enter image description here