Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why `nohup postgres 2>&1 > postgres.log &` instead of `pg_ctl start`? You could also use `pg_ctl -w start` to wait for proper server startup instead of `sleep 2`


Why? Ignorance. I'm used to running postmaster from years past (when not starting from an /etc script). Postmaster is now just called postgres, and it works for a disposable test instance setup.

I'll look into that, though, as it sounds like the right thing vs the sleep hack.


... and I put the 2>&1 in the wrong place :-(

(before the file redirection instead of after)




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: