Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 152931 - at first start, it seems to fail
Summary: at first start, it seems to fail
Status: CLOSED DUPLICATE of bug 166117
Alias: None
Product: Fedora
Classification: Fedora
Component: postgresql
Version: 4
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Tom Lane
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2005-03-31 01:23 UTC by Florin Andrei
Modified: 2013-07-03 03:05 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-09-30 15:39:02 UTC

Attachments (Terms of Use)

Description Florin Andrei 2005-03-31 01:23:18 UTC
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):

How reproducible:
Didn't try

Steps to Reproduce:
1. see above

Additional info:

Comment 1 Tom Lane 2005-03-31 01:56:56 UTC
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-31 02:04:57 UTC
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-31 02:17:30 UTC
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 15:39:02 UTC
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.