Bug 121754

Summary: System V script rhdb does not substitute PGOPTS variable to postmaster parameters
Product: Red Hat Enterprise Linux 3 Reporter: Victor Ashik <victor>
Component: rh-postgresqlAssignee: Tom Lane <tgl>
Status: CLOSED DUPLICATE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 3.0CC: hhorak
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 19:02:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Victor Ashik 2004-04-27 12:13:03 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Description of problem:
Script /etc/init.d/rhdb contains line 88:

export PGOPTS

but does not use this variable nowhere else.
The line 171 that starts postmaster does not contain it: 

su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl  -D $PGDATA -
p /usr/bin/postmaster -o '-p ${PGPORT}' start  > /dev/null 2>&1" 
< /dev/null

We can append ' ${PGOPTS}' just after ${PGPORT} to allow additional 
command line parameters came from /etc/sysconfig/pgsql/rhdb:

su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl  -D $PGDATA -
p /usr/bin/postmaster -o '-p ${PGPORT} ${PGOPTS}' start  > /dev/null 
2>&1" < /dev/null



Version-Release number of selected component (if applicable):
rh-postgresql-server-7.3.4-9

How reproducible:
Always

Steps to Reproduce:
1. echo PGOPTS='-h localhost'
2. service rhdb restart
3. netstat -ntl|grep '127\.0\.0\.1'
    

Actual Results:  PostgreSQL does not listen 127.0.0.1 

Expected Results:  PostgreSQL does listen 127.0.0.1 

Additional info:

Comment 1 Tom Lane 2004-04-28 13:55:30 UTC
This is a known issue already, see bug #111504 for prior discussion.

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

Comment 2 Red Hat Bugzilla 2006-02-21 19:02:47 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.