Re: [HACKERS] Re: syslog logging setup broken?
Re: [HACKERS] Re: syslog logging setup broken?
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Oliver Elphick" writes: > "Nic Ferrier" wrote: >>>> - the postmaster was being started without nohup > 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? regards, tom lane
Re: [HACKERS] Re: syslog logging setup broken?
От:
Tatsuo Ishii <t-ishii@sra.co.jp>
Дата:
> > 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
Re: [HACKERS] Re: syslog logging setup broken?
От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Tatsuo Ishii writes: > Moreover if postmaster detaches itself to be a deamon, nohup is not > necessary at all. Right. Scrap that thought then. > 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. Waiting for the postmaster to start up is really only useful when you start it interactively, either during development, or if you need to repair a problem. In either of these cases you might as well (and probably rather should) look at the log output yourself, i.e., just use 'postmaster'. > 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. Exactly. No waiting on startup by default then? -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/