Bug 123951 - enabling the daemon to listen on the network (suggestion)
Summary: enabling the daemon to listen on the network (suggestion)
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rh-postgresql   
(Show other bugs)
Version: 3.0
Hardware: All Linux
Target Milestone: ---
Assignee: Tom Lane
QA Contact:
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2004-05-21 21:47 UTC by Matt Bradshaw
Modified: 2013-07-03 03:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-05-21 22:34:38 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Matt Bradshaw 2004-05-21 21:47:51 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031114 Epiphany/1.0.4

Description of problem:
at the present, the only way to enable listening on the network is to
modify postgres' (ie: rhdb) init script.  as it stands, apps
connecting to the server must be local.  (i assume it's using a unix
dgram socket, or pipe or something.  anyhoo, besides the point.)

[details for those interested:  on line 171 of /etc/init.d/rhdb, we
are required to append a "-i" to the options of postmaster (using

this isn't too terribly difficult to do, but a problem does arise when
the package is upgraded.  upon (automatic) upgrade, the init script
gets overwritten and your necessary changes are erased.  in addition,
since the package restarts itself upon upgrade, any apps that depend
on a network connection to the database break.

i believe it'd be easy to rememdy this.

the underlying problem is simply that you haven't separated
configuration from the application itself.  you could delegate options
to the postmaster daemon in an environment variable within
/etc/sysconfig/rhdb (similiar to the samba package).  or you could be
more elaborate and have a NETLISTEN=yes (similar to the sendmail
package's DAEMON=yes) and have rhdb's init script account for such

baking this into the package would be the Right Thing to do, i believe.

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

How reproducible:

Steps to Reproduce:
1. change the init script to allow fairly common requirement of
2. upgrade the package (sometimes automatically even)

Actual Results:  now there is no more ability to listen on the network

Expected Results:  well... i expected what happened, but it'd be much
nicer to have the init script extended to account for this certainly
common configuration.

Additional info:

Comment 1 Tom Lane 2004-05-21 22:34:38 UTC
It is not true at all that you have to modify the initscript to enable
TCP connections.  The preferred way to do this is to set tcpip_socket
to true in postgresql.conf.  AFAIK, other than the initial
specification of data directory there is no need to put anything at
all on the postmaster command line; all else can be set from the
config file.

Comment 2 Matt Bradshaw 2004-06-01 20:25:27 UTC
doh.  i apologize for the above misinformation.  thank you for
correcting me.

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