Hacker News new | ask | show | jobs
by AlterEgo20 4008 days ago
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`
2 comments

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)