Re: [GENERAL] restarting after power outage

2005-04-27 Thread Uwe C. Schroeder
On Wednesday 27 April 2005 15:17, Doug McNaught wrote: > "Uwe C. Schroeder" <[EMAIL PROTECTED]> writes: > > Is this just me or did anyone actually think about adding a UPS to > > the machine and monitor it with NUT ? That way the machine would > > shut down properly, making the whole stale pid-fil

Re: [GENERAL] restarting after power outage

2005-04-27 Thread Doug McNaught
"Uwe C. Schroeder" <[EMAIL PROTECTED]> writes: > Is this just me or did anyone actually think about adding a UPS to > the machine and monitor it with NUT ? That way the machine would > shut down properly, making the whole stale pid-file issue > irrelevant. UPSs fail. People kick out power cords

Re: [GENERAL] restarting after power outage

2005-04-27 Thread Uwe C. Schroeder
Is this just me or did anyone actually think about adding a UPS to the machine and monitor it with NUT ? That way the machine would shut down properly, making the whole stale pid-file issue irrelevant. UC On Wednesday 27 April 2005 13:41, Tom Lane wrote: > Philip Hallstrom <[EMAIL PROTECTED]>

Re: [GENERAL] restarting after power outage

2005-04-27 Thread Tom Lane
Philip Hallstrom <[EMAIL PROTECTED]> writes: > Although I like having a separate startup script that runs first to go > around removing this and other things as well... I think most Unix variants have a specific bootup script that's charged with doing exactly that; if you can find it, that's a go

Re: [GENERAL] restarting after power outage

2005-04-27 Thread Philip Hallstrom
It is. We have been fooling with the postmaster startup logic to try to eliminate this gotcha, but it's only very recently (8.0.2) that I think we got it right. So, then it would be correct to change my init scripts to do the following: (if so, this patch can be applied to the 7.4 branch) I woul

Re: [GENERAL] restarting after power outage

2005-04-27 Thread Peter Wiersig
On Wed, Apr 27, 2005 at 03:03:50PM -0400, Doug McNaught wrote: > > What I have done is to create a separate init.d script that > removes the PID file, and arrange for it to run before the PG > startup script. An even better place (if you really want to do all this) would be something that happens

Re: [GENERAL] restarting after power outage

2005-04-27 Thread Doug McNaught
Tom Lane <[EMAIL PROTECTED]> writes: > Jon Lapham <[EMAIL PROTECTED]> writes: >> Tom Lane wrote: >>> It is. We have been fooling with the postmaster startup logic to try to >>> eliminate this gotcha, but it's only very recently (8.0.2) that I think >>> we got it right. > >> So, then it would be c

Re: [GENERAL] restarting after power outage

2005-04-27 Thread Jon Lapham
Tom Lane wrote: Jon Lapham <[EMAIL PROTECTED]> writes: So, then it would be correct to change my init scripts to do the following: (if so, this patch can be applied to the 7.4 branch) I would recommend strongly AGAINST that, because what you just did was remove the defense against starting two po

Re: [GENERAL] restarting after power outage

2005-04-27 Thread Tom Lane
Jon Lapham <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> It is. We have been fooling with the postmaster startup logic to try to >> eliminate this gotcha, but it's only very recently (8.0.2) that I think >> we got it right. > So, then it would be correct to change my init scripts to do the >

Re: [GENERAL] restarting after power outage

2005-04-27 Thread Jon Lapham
Tom Lane wrote: Jon Lapham <[EMAIL PROTECTED]> writes: After a power outage (and bad UPS combo, or plug pull, or bad RAM, etc) sometimes (I would guess <10% of the time) postgresql fails to restart automatically after booting the computer. Invariably, it is because the "postmaster.pid" file exi

Re: [GENERAL] restarting after power outage

2005-04-27 Thread Tom Lane
Jon Lapham <[EMAIL PROTECTED]> writes: > After a power outage (and bad UPS combo, or plug pull, or bad RAM, etc) > sometimes (I would guess <10% of the time) postgresql fails to restart > automatically after booting the computer. Invariably, it is because the > "postmaster.pid" file exists, but

[GENERAL] restarting after power outage

2005-04-27 Thread Jon Lapham
Hello, The following has happened to me maybe 3 or 4 times over the past few years (and again today), so I thought I might send in an email to the list to see if others experience this. After a power outage (and bad UPS combo, or plug pull, or bad RAM, etc) sometimes (I would guess <10% of the