> > If postmaster is being started by init, it should not need nohup, because
> > init never exits and postmaster is not going to get shutdown unexpectedly.
>
> On the other hand, when pg_ctl is invoked by hand, it probably is a bug
> that it fails to use nohup. Perhaps this is a reason why pg_ctl should
> not be made into a substitute for a startup script?
If pg_ctl unconditionally use nohup, it might be a performance penalty
as Oliver mentioned.
> nohup has a performance cost, in that (at least on Linux) it automatically
> nices (lowers the priority of) the process. You may not want the
> priority lowered...
Moreover if postmaster detaches itself to be a deamon, nohup is not
necessary at all.
BTW, for the startup script, I don't think we need to use pg_ctl.
Invoking postmaster directry seems enough for me. The only reason for
using pg_ctl to start postmaster is waiting for postmaster up and
running. In most cases the time to recover DB would not be so
long. And if the recovery took too long time, we would not want to be
blocked in the middle of the boot sequence anyway.
Comments?
--
Tatsuo Ishii