Bug 57834 - "/etc/init.d/postgresql start" doesn't detect postmaster correctly
Summary: "/etc/init.d/postgresql start" doesn't detect postmaster correctly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: postgresql
Version: 7.2
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Andrew Overholt
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-12-27 01:03 UTC by Dave Peticolas
Modified: 2007-03-27 03:50 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-03-12 21:56:52 UTC
Embargoed:


Attachments (Terms of Use)

Description Dave Peticolas 2001-12-27 01:03:29 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011014

Description of problem:
The postgresql /etc/init.d script detects an existing postmaster
by using pidof. This is wrong, because users can start their own
postmaster servers on user-created databases without interfering
with the main server. However, the script will not distinguish
between them and refuse to start the main server if there are
other servers running.

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


How reproducible:
Always

Steps to Reproduce:
1. /etc/init.d/postgresql stop
2.start a postmaster for a user-created database
3./etc/init.d/postgresql start



Actual Results:  The init script reports that the postmaster is already
running.

Expected Results:  It should have started a postmaster for the central
database.

Additional info:

I think it would be better to use pg_ctl's status operation
to detect a postmaster for the main database.

Comment 1 Trond Eivind Glomsrxd 2002-01-09 21:38:25 UTC
Seems like a good idea, will do.

Comment 2 Andrew Overholt 2003-03-12 21:56:52 UTC
The initscript does not use pg_ctl yet, but multiple postmasters are now (as of
PostgreSQL version 7.3.2) supported.


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