Bug 152931 - at first start, it seems to fail
at first start, it seems to fail
Status: CLOSED DUPLICATE of bug 166117
Product: Fedora
Classification: Fedora
Component: postgresql (Show other bugs)
4
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Tom Lane
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-30 20:23 EST by Florin Andrei
Modified: 2013-07-02 23:05 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-30 11:39:02 EDT
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 Florin Andrei 2005-03-30 20:23:18 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1

Description of problem:
When running pgsql for the first time, it initialized the DB just fine, but then it seems to fail to start up:

# /etc/init.d/postgresql start
Initializing database:                                     [  OK  ]
Starting postgresql service:                               [FAILED]

However, further investigation shows that that's not the case:

# /etc/init.d/postgresql status
postmaster (pid 8278 8277 8276 8274 8271) is running...

Subsequent attempts to run the DB server are fine:

# /etc/init.d/postgresql stop
Stopping postgresql service:                               [  OK  ]
# /etc/init.d/postgresql status
postmaster is stopped
# /etc/init.d/postgresql start
Starting postgresql service:                               [  OK  ]
# /etc/init.d/postgresql status
postmaster (pid 8446 8445 8444 8442 8440) is running...


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

How reproducible:
Didn't try

Steps to Reproduce:
1. see above
2.
3.
  

Additional info:
Comment 1 Tom Lane 2005-03-30 20:56:56 EST
If the postmaster did in fact start, the only explanation that I can see is that /etc/rc.d/init.d/postgresql 
did not wait long enough for "su -c" to launch it.  It's hard to believe that "sleep 2" wouldn't be plenty 
on any modern machine though.  Do you want to try playing with the length of that sleep?
Comment 2 Florin Andrei 2005-03-30 21:04:57 EST
So, i have to uninstall pgsql, remove all its remains, then install it back
again, then repeat the test, right?
What sleep values would you try?
The machine is a PIII/800 with 256MB RAM and a 20GB IDE drive. Fairly old.
Comment 3 Tom Lane 2005-03-30 21:17:30 EST
No, you needn't reinstall.  Just stop the service and do rm -rf /var/lib/pgsql/data, then start it again.

I would try "sleep 1" and even no sleep at all to see if the failure becomes consistent, and then increase 
the delay to see where it seems to go away.

Right offhand I see no reason why the first start would be more prone to failure than later ones, so you 
might also check the restart case ...
Comment 4 Tom Lane 2005-09-30 11:39:02 EDT
I'm going to close this bug as a duplicate of #166117, which is describing the
same problem, but has more information.  Please feel free to add any additional
information to that bug entry.

*** This bug has been marked as a duplicate of 166117 ***

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