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:
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?
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.
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 ...
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 ***