Peter Eisentraut wrote:
> Well, if you have something clever you want to do if the postmaster
> doesn't come down after an orderly shutdown then please share it. The
> current alternatives are 'leave running' or 'kill -9'. I know I'd prefer
> the former.
Well, my preferences aren't really relevant here. I have a job to do as
an initscript in the RPMish environment -- and I really have to meet my
obligations (using the first personal pronoun there to anthropomorph the
initscript to a person, allowing us to have a little sympathy for the
poor shell script's plight :-)).
My preference is to let it float in limbo -- if it's in limbo and won't
come out, then we have bigger issues.
However, I could do something really sneaky in the RedHat environment
and let init do the dirty work for me -- but, again, I am not at all
guaranteed that things will come down orderly -- if it is at all
possible for me to bring about an orderly (if slow) shutdown that does
terminate as the rest of the system needs it to do, then I'll attempt to
But, the immediate issue is preventing chaotic stops within the
initscript, so I'm going to experiment with things and see if I can make
the initscript hang -- if I can't, then I'll likely put in the 'killproc
postmaster -INT' with escalation to -TERM if it doesn't come down within
sixty seconds (and, no, I am not going to sleep 60 then check things --
I am going to sleep 1 and loop sixty times) -- no need to unnecessarily
delay system shutdown (and potential restart). And I won't put in the
-KILL unless I can find a safe and thorough way to do so.
Or I may go ahead and pg_ctl-ize things and let pg_ctl do the dirty
work, as that IS what pg_ctl is supposed to accomplish.
WGCR Internet Radio
1 Peter 4:11
In response to
pgsql-hackers by date
|Next:||From: Alfred Perlstein||Date: 2001-03-06 19:12:16|
|Subject: Re: How to shoot yourself in the foot: kill -9 postmaster|
|Previous:||From: Jarom Hagen||Date: 2001-03-06 19:02:40|