Re: [HACKERS] Re: [BUGS] syslog logging setup broken?

2001-02-06 Thread Tatsuo Ishii

 The man page suggests that nohup is required to init postmaster, I
 know this isn't true but to implement an example init file and not
 match up with the man page seemed foolish.
 
 I guess nohup would stop postmaster doing something awfull if it
 doesn't handle HUP properly but I very much doubt that you guys fail
 to handle HUP.

Good point. postmaster in 7.1 uses HUP signal to re-read
postgresql.conf. It seems we should not use nohup to start postmaster.
--
Tatsuo Ishii



Re: [HACKERS] Re: [BUGS] syslog logging setup broken?

2001-02-05 Thread Nic Ferrier

 Bruce Momjian [EMAIL PROTECTED] 04-Feb-01 10:07:40 PM 

 The bottom line is that, IMHO, writing a portable 
 init.d style (or any other such concept) startup file 
 that is ready for blind use is beyond practicality.  
 It might be better to collect a few of the ones that are
 being used now (Red Hat-style, SuSE-style, Debian, 
 *BSD-style) and ship them.  This should be coordinated 
with the packagers, though. 

Should I remove init.d from /contrib?

I'm just a postgres user but I don't agree with Peter. I think the
file is valuable.

The file is valuable for people not using a distribution such as
Debian, etc... and also is usefull to people developing packages for
distributions.

I don't use a packaged postgres and it was certainly valuable to me
because it served as an example of what I had to do to get postgres
going quickly in the way that I wanted.

I sent Peter an updated file that IMHO irons out some problems which
may cause Peter to consider the file broken:

- ouptut was being piped to the logger if "syslog" was on
It's not necessary to do that because postgres handles the decision
about syslog depending on the conf file.

- the postmaster was being started without nohup

- the system for setting options wasn't very usefull
the system that I've replaced it with isn't terribly usefull either
but it works.


So anyway, my view as a user is that it's usefull and that a package
specific version would come with the package anyway.


Nic Ferrier
Tapsell-Ferrier Limited




Re: [HACKERS] Re: [BUGS] syslog logging setup broken?

2001-02-05 Thread Tom Lane

"Oliver Elphick" [EMAIL PROTECTED] 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: [BUGS] syslog logging setup broken?

2001-02-05 Thread Tatsuo Ishii

  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: [BUGS] syslog logging setup broken?

2001-02-04 Thread Bruce Momjian

 Tom Lane writes:
 
  Peter Eisentraut [EMAIL PROTECTED] writes:
   The example startup file is outdated and broken.  Don't use it.
 
  Er ... shouldn't we fix it?  Or remove it?
 
 See my message on -hackers, "Sparc/Linux patch" thing follow-up.
 
 The bottom line is that, IMHO, writing a portable init.d style (or any
 other such concept) startup file that is ready for blind use is beyond
 practicality.  It might be better to collect a few of the ones that are
 being used now (Red Hat-style, SuSE-style, Debian, *BSD-style) and ship
 them.  This should be coordinated with the packagers, though.
 

Should I remove init.d from /contrib?

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 853-3000
  +  If your life is a hard drive, |  830 Blythe Avenue
  +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026



Re: [HACKERS] Re: [BUGS] syslog logging setup broken?

2001-02-04 Thread Peter Eisentraut

Nic Ferrier writes:

 Should I remove init.d from /contrib?

 I'm just a postgres user but I don't agree with Peter. I think the
 file is valuable.

I didn't say it wasn't valuable, I just said it didn't work...

This problem seems to call for a more general solution than a handful of
example style files.

-- 
Peter Eisentraut  [EMAIL PROTECTED]   http://yi.org/peter-e/