Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

share|improve this question

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

share|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. – Yavor Shahpasov Aug 17 '11 at 19:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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