Bug 151421

Summary: PostgreSQL server does not start after crash because wrong PID file location
Product: Red Hat Enterprise Linux 4 Reporter: Milan Kerslager <milan.kerslager>
Component: postgresqlAssignee: Tom Lane <tgl>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: hhorak
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-06-01 13:24:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milan Kerslager 2005-03-17 18:52:55 UTC
After the system crash (reboot) the PostgreSQL server does not start because PID
file /var/lib/pgsql/data/postmaster.pid is not removed by initscripts at the
startup sequence. This is not a fault of initscripts but this is a bug in the
default PostgreSQL configuration.

The PostgreSQL server should have only one PID file in
/var/run/postmaster.<PID>.pid or the second PID file in /var/run/postgresql
subdirectory. After this relocation, initscripts should be fixed (postgresql
directory added, see line 943 in /etc/rc.d/rc.sysinit).

This is a very anoying longstandig bug so please make a REAL fix. When the
service does not start after the reboot (when NO other posmaster is able to run)
I think something is wrong in the bix complecity of /etc/init.d/postgresql. Also
I'm wondering why the hell there are two different same PID files...

Comment 1 Tom Lane 2005-03-17 19:15:02 UTC
AFAIK this has been fixed for months (since postgresql-7.4.5-3 to be specific). 
You have not provided any details, like say the Postgres version you are using.

Comment 2 Milan Kerslager 2005-03-17 19:21:56 UTC
As filled above, this is fully up-to-date RHEL4.
With OOPSing kernel (probably HW problem).

Comment 3 Tom Lane 2005-03-18 00:18:51 UTC
After a suitable period of contemplation, I have realized that the fix
previously applied did not catch all the cases it was intended to :-(.

http://archives.postgresql.org/pgsql-hackers/2005-03/msg00619.php

Will work on it.  It may be too late for RHEL4U1 though.

Comment 4 Josh Bressers 2005-06-01 13:24:10 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-433.html