Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer 1

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. postgresql.org/docs/8.2/static/app-pg-ctl.html –  Yavor Shahpasov Aug 17 '11 at 19:31
add comment

Your Answer

 
discard

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.