Bug 121754 - System V script rhdb does not substitute PGOPTS variable to postmaster parameters
System V script rhdb does not substitute PGOPTS variable to postmaster parame...
Status: CLOSED DUPLICATE of bug 111504
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rh-postgresql (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Tom Lane
Depends On:
  Show dependency treegraph
Reported: 2004-04-27 08:13 EDT by Victor Ashik
Modified: 2013-07-02 23:01 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 14:02:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Victor Ashik 2004-04-27 08:13:03 EDT
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):

How reproducible:

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 

Expected Results:  PostgreSQL does listen 

Additional info:
Comment 1 Tom Lane 2004-04-28 09:55:30 EDT
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 14:02:47 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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