Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 71295 - PID file isn't removed after system crash, resulting in not starting service
PID file isn't removed after system crash, resulting in not starting service
Product: Red Hat Linux
Classification: Retired
Component: postgresql (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
Depends On:
  Show dependency treegraph
Reported: 2002-08-12 03:14 EDT by Peter Bieringer
Modified: 2013-07-02 22:59 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-05 15:29:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Peter Bieringer 2002-08-12 03:14:27 EDT
Description of problem:
After system crashes, the postgresql service won't start, because of the PID
file /var/lib/pgsql/data/postmaster.pid still exists after rebooting.
Unfortunately, the PID was already valid again after reboot (process httpd..). 
BTW: It's not good to pipe all the postmaster start output to /dev/null,
including the error log. Better will be to put this messages to boot.log.

Version-Release number of selected component (if applicable):

How reproducible:
Didn't try

Steps to Reproduce:
1. Hard system reset
2. PID in postgresql PID file was owned after reboot by another process
3. Try to start postgresql

Actual Results:  Service won't start

Expected Results:  Initscript detects stale PID file or it will be deleted on

Additional info:
Comment 1 Trond Eivind Glomsrxd 2002-08-12 14:37:09 EDT
Any possibility of removing pid files in the initscripts, Bill?
Comment 2 Bill Nottingham 2002-08-12 16:43:12 EDT
We remove ones in standard directories (i.e., /var/run). Anything in
non-standard directories probably needs to be handled by the app's init script.
Comment 3 Trond Eivind Glomsrxd 2002-08-12 18:11:10 EDT
The pid file in question is /var/run/postmaster.pid, so it should work then...
recent addition?
Comment 4 Bill Nottingham 2002-08-12 18:56:45 EDT
The pid file referenced in the bug is /var/lib/pgsql/data/postmaster.pid
Comment 5 Trond Eivind Glomsrxd 2002-08-12 19:28:26 EDT
Doh. Yes, there are two. One by the initscript, one for the database. I'll just
forceably remove the latter.
Comment 6 Andrew Overholt 2003-03-12 17:39:46 EST
This is being addressed in some reworking of the init script.  Reassigning.
Comment 7 Tom Lane 2004-10-05 15:29:42 EDT
I've finally found a hack that solves this problem without the risks
involved in forcibly deleting the lock file.  It's fixed for FC3 and
RHEL3 U4.  See bug #134090.

Note You need to log in before you can comment on or make changes to this bug.