I just made a mistake: I installed PostgreSQL on Mac OSX 10.6.7 and when I wanted to connect to it I did su postgres
, then it asked me for a password and I did sudo passwd postgres
to change the password to something I know.
The problem is, as explained here, this created a Unix user account for postgres and afterwards I had two users on my Mac : me and postgres.
So I deleted the postgres account. Now I cannot connect to postgres because I just cannot su postgres
. How to recreate a "locked" user account postgres that I could use safely (by doing sudo su postgres
as I should have done before) ?
Edit: added version of Mac OS X
postgres
. What value should I use for thepostgres
user'sUniqueID
? I don't think it matters much, but what number would you suggest and why? And should I also create a new group namedpostgres
? If not, then what value should I put for thepostgres
user'sPrimaryGroupID
. Why does macOS come with the user_postgres
and the group_postgres
but not PostgreSQL itself? Should I just use the_postgres
user instead of creating a new one namedpostgres
?