Bug 1090183

Summary: Allow the init script instantiate multiple servers running on different IP's but listening on the same port
Product: Red Hat Software Collections Reporter: John Fulton <johfulto>
Component: postgresqlAssignee: Jozef Mlich <jmlich>
Status: CLOSED ERRATA QA Contact: Jakub Prokes <jprokes>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rh-postgresql94CC: bblaskov, databases-maint, hhorak
Target Milestone: rc   
Target Release: 2.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rh-postgresql94-postgresql-9.4.1-2.el6, rh-postgresql94-postgresql-9.4.1-2.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-04 08:40:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
diff -u postgresql92-postgresql.dist postgresql92-postgresql > postgresql92.patch none

Description John Fulton 2014-04-22 20:43:29 UTC
Created attachment 888663 [details]
diff -u postgresql92-postgresql.dist postgresql92-postgresql > postgresql92.patch

Description of problem:

The postgresql init script is prepared to be copied (or symlinked) but
it has its local variable 'pidfile' defined like:

  pidfile="/var/run/postmaster.${PGPORT}.pid"

This makes the script differentiate lock files for separated instances just
based on the PGPORT.  If the PGPORT has the same value for more then one
postgres server, these init servers may not co-exist without additional changes
of the script.

The 'pidfile' variable should be ideally defined before sourcing per-instance
configuration file and reuse ${NAME} variable somehow. The attached
patch file could be useful. 

Version-Release number of selected component (if applicable):
* postgresql92-postgresql-server-9.2.7-2.el6 provides postgresql92-postgresql 

How reproducible:
* it is the default behaviour

Additional info:
* Bug 996492 also documented this but the customer with this problem is now experiencing it with Software Collections hence this bug.

Comment 2 Honza Horak 2014-04-23 10:55:05 UTC
Now it's too late for RHSCL-1.1, so moving to RHSCL-1.2.

Comment 7 errata-xmlrpc 2015-06-04 08:40:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2015-1055.html