restarting after power outage

From: Jon Lapham <lapham(at)jandr(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: restarting after power outage
Date: 2005-04-27 17:54:09
Message-ID: 426FD1C1.90404@jandr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)bilbo init.d]# head -1 /etc/issue
Fedora Core release 3 (Heidelberg)
[root(at)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(at)bilbo init.d]# rpm -q postgresql
postgresql-7.4.7-3.FC3.1

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Wiersig 2005-04-27 17:58:59 Re: Had a problem with pg_clog
Previous Message Mak, Jason 2005-04-27 17:12:42 populating a table via the COPY command using C code.