Re: run 2 instances of postgres 9.4 on same linux VM - Mailing list pgsql-general

From John R Pierce
Subject Re: run 2 instances of postgres 9.4 on same linux VM
Date
Msg-id 5641524B.3010100@hogranch.com
Whole thread Raw
In response to Re: run 2 instances of postgres 9.4 on same linux VM  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
On 11/9/2015 5:50 PM, John R Pierce wrote:
> these instructions are specific to RHEL 6/CentOS6 and assume you've
> installed postgresql from the yum.postgresql.org repository.   all
> commands run as root.   /path/to/new/data  must be owned by
> postgresql:postgresql and have 700 permissions.
>
>     cd /etc/init.d
>     cp postgresql-9.4 postgresql-9.4B
>     cd /etc/sysconfig/pgsql
>     echo PGPORT=5433 > postgresql-9.4B
>     echo PGDATA=/path/to/new/data >> postgresql-9.4B
>     chkconfig postgresql-9.4B on
>     service postgresql-9.4B initdb
>     service postgresql-9.4B start
>

and wow, I forgot.   this no longer works with PG 9.4, instead of
setting PGPORT in /etc/sysconfig/pgsql/$SERVICENAME, you have to edit
/path/to/new/data/postgresql.conf after the initdb step and change the
port number there before you can start the service.

I'm not sure why they did this, its quite annoying as you can't readily
see which postmaster process is on which port when you examine `ps` output.



--
john r pierce, recycling bits in santa cruz



pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: run 2 instances of postgres 9.4 on same linux VM
Next
From: Craig Ringer
Date:
Subject: Re: BDR - Remove & Join