I am running PostgreSQL in OS X. I am trying to restart the postgres service. When I attempt to sudo su postgres, nothing happens

admin$ sudo su postgres
admin$ 

Then, I try using -l and this is what I get

admin$ sudo su -l postgres
su: no directory

Unless I can get su access to the postgres account, I cannot figure out how to restart postgres

link|improve this question
feedback

1 Answer

This means that the postgres user does not have a home directory or the directory does not exist/is not accessible

link|improve this answer
Thanks. Is it as simple as creating a /home/postgres directory and chowing it to postgres? – Andrew Aug 17 '11 at 19:09
Yes but basically you should use pg_ctl to stop start postgres. The weird thing is I just searched for it on my mac and I could not find it. – Yavor Shahpasov Aug 17 '11 at 19:27
It appears I don't have it installed :) that feels stupid. Anyhow you should search for pg_ctl (find / -name pg_ctl as root). Then use that command to start stop it. postgresql.org/docs/8.2/static/app-pg-ctl.html – Yavor Shahpasov Aug 17 '11 at 19:31
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.