Re: /var/run/postgresql/.s.PGSQL.5432 should be 5433 - Mailing list pgsql-admin

From Scott Whitney
Subject Re: /var/run/postgresql/.s.PGSQL.5432 should be 5433
Date
Msg-id BY1PR11MB0390F03EEC462700D6B25EBAA7CC0@BY1PR11MB0390.namprd11.prod.outlook.com
Whole thread Raw
In response to /var/run/postgresql/.s.PGSQL.5432 should be 5433  (Poul Kristensen <bcc5226@gmail.com>)
Responses Re: /var/run/postgresql/.s.PGSQL.5432 should be 5433  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-admin

1) You should have a script in /etc/init.d called something like postgresql-VERSION


2) Rename this to postgresql-SomeIdentifierThatRunsOn5432

3) Copy it to postgresql-SomeIdentifiedThatRunsOn5433

4) You now have 2 identical scripts in /etc/init.d


5) In /etc/sysconfig/pgsql create 2 scripts named the same thing. The exact same names as your scripts in /etc/init.d


6) They will say something like this:


PGDATA=/pgdata/myDirTo5432
PGPORT=5432
PGLOG=/var/lib/pgsql/pgstartup.${PGPORT}.log


PGDATA=/pgdata/myDirTo5433
PGPORT=5433
PGLOG=/var/lib/pgsql/pgstartup.${PGPORT}.log


Then do your service SCRIPTNAME initdb and service SCRIPTNAME start


Works for me.






From: pgsql-admin-owner@postgresql.org <pgsql-admin-owner@postgresql.org> on behalf of Poul Kristensen <bcc5226@gmail.com>
Sent: Tuesday, September 27, 2016 3:08 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] /var/run/postgresql/.s.PGSQL.5432 should be 5433
 
Hi !

I have need to have to difference Postgres version runnung on the same RHEL 7.2 server.

They are listening on 2 different ports as configured but socket is still listening
on  port 5432 for  both of them.

How come and how do I change this?

TIA

Poul 



Journyx, Inc.
7600 Burnet Road #300
Austin, TX 78757
www.journyx.com

p 512.834.8888 
f 512-834-8858 

Do you receive our promotional emails? You can subscribe or unsubscribe to those emails at http://go.journyx.com/emailPreference/e/4932/714/ 

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: /var/run/postgresql/.s.PGSQL.5432 should be 5433
Next
From: Tom Lane
Date:
Subject: Re: Wrong stat on pg_stat_user_tables