restarting after power outage - Mailing list pgsql-general

From Jon Lapham
Subject restarting after power outage
Date
Msg-id 426FD1C1.90404@jandr.org
Whole thread Raw
Responses Re: restarting after power outage  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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 time) postgresql fails to restart
automatically after booting the computer.  Invariably, it is because the
"postmaster.pid" file exists, but maybe this is just a symptom of
something else.  The solution I have been performing is to simply delete
this file, and then restart postgres (service postgresql start).

Is this the correct procedure?  Should I be doing something else?  Do
others see this, or am I the only one?

Finally, I would make the suggestion that the init script should check
to see if the PID file exists BEFORE starting the server.  If so, issue
some sort of message on how to procede.

Thanks, Jon

PS: vital stats:

[root@bilbo init.d]# head -1 /etc/issue
Fedora Core release 3 (Heidelberg)
[root@bilbo init.d]# uname -a
Linux bilbo 2.6.11-1.14_FC3 #1 Thu Apr 7 19:23:49 EDT 2005 i686 athlon
i386 GNU/Linux
[root@bilbo init.d]# rpm -q postgresql
postgresql-7.4.7-3.FC3.1


--
-**-*-*---*-*---*-*---*-----*-*-----*---*-*---*-----*-----*-*-----*---
  Jon Lapham  <lapham@jandr.org>                Rio de Janeiro, Brasil
  Personal: http://www.jandr.org/
***-*--*----*-------*------------*--------------------*---------------


pgsql-general by date:

Previous
From: "Mak, Jason"
Date:
Subject: populating a table via the COPY command using C code.
Next
From: Peter Wiersig
Date:
Subject: Re: Had a problem with pg_clog