Bug 141811 - Postgresql fails on start of service.
Postgresql fails on start of service.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: SysVinit (Show other bugs)
4.0
All Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
: 143829 (view as bug list)
Depends On: 139545
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-03 16:19 EST by Martin Jenner
Modified: 2014-03-16 22:51 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-08 18:05:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Jenner 2004-12-03 16:19:22 EST
Description of problem:

Postgresql init script fails. 

# service postgresql start
Starting postgresql service:                               [FAILED]

Investigation found this to happen whether selinux was either enabled
or disabled.

It seems to be the line

   pid=`pidof -s $PGENGINE/postmaster`

that is causing the problem. The pidof command failed (returns 1) when
pointed to a symlink. If however pidof is used with a real file for
example:

# pidof /usr/bin/postmaster

# pidof /usr/bin/postgres
5538 5537 5536

# ls -l /usr/bin/postmaster /usr/bin/postgres
-rwxr-xr-x  1 root root 2246168 Oct 23 17:10 /usr/bin/postgres
lrwxrwxrwx  1 root root       8 Dec  1 12:26 /usr/bin/postmaster ->
postgres


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

postgresql-server-7.4.6-1.RHEL4.1 

How reproducible:

Always

Steps to Reproduce:
1. See description of problem
2.
3.
  
Actual results:
service start fails

Expected results:
service should start without failing.

Additional info:
Comment 1 Tom Lane 2004-12-03 18:26:20 EST
Just to confirm: the postmaster does start, right?  The problem is
only that the init script doesn't think so?

The pidof test has been in there since approximately forever, and
postmaster has always been a symlink to postgres, so it's hard to see
why that would suddenly be failing.  Looks like pidof is in one of
notting's packages, so I'm cc'ing him for any clues.
Comment 2 Bill Nottingham 2004-12-03 21:44:39 EST
Out of idle curiousity... what happens if you back down to release -33
or -34 of SysVinit?
Comment 3 Martin Jenner 2004-12-06 10:19:16 EST
Tried Sysinit -34 and postgresql starts without producing the failure
message.

# rpm -Uvh --oldpackage SysVinit-2.85-34.x86_64.rpm
# rpm -q SysVinit
SysVinit-2.85-34

# service postgresql start
Starting postgresql service:                               [  OK  ]
# ps -ef | grep post
postgres 13677     1  0 08:37 ?        00:00:00 /usr/bin/postmaster -p
5432 -D /var/lib/pgsql/data
postgres 13679 13677  0 08:37 ?        00:00:00 postgres: stats buffer
process
postgres 13680 13679  0 08:37 ?        00:00:00 postgres: stats
collector process
root     13687  6655  0 08:37 pts/1    00:00:00 grep post
Comment 4 Tom Lane 2004-12-08 17:48:14 EST
Reassigning to sysvinit component --- not sure if notting thinks this
is ready to close or not.
Comment 5 Bill Nottingham 2004-12-08 18:05:51 EST
New SysVinit is kicked out. So, 'fixed'.
Comment 6 Tom Lane 2004-12-29 12:37:11 EST
*** Bug 143829 has been marked as a duplicate of this bug. ***
Comment 7 Tom Lane 2004-12-29 12:38:50 EST
Marking this bug public, in hopes of not getting more duplicate
reports.

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