Re: 2 postgresql server on the same station : conflict?

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: 2 postgresql server on the same station : conflict?
Date: 2013-05-28 16:51:56
Message-ID: 51A4E0AC.9030108@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5/28/2013 3:02 AM, Raymond O'Donnell wrote:
> On 28/05/2013 10:57, image wrote:
>> >Hello,
>> >
>> >On the same station, i have 2 postgresql server: one for my postgis db
>> >(v9.1) and so another installed with opener^7 (9.2). Unfortunalty, i noticed
>> >i'm obliged to stop service for my postgresql postgis (9.1) in order to use
>> >openerp7 (postgres9.2). I 'm surprised about that. There is there a way to
>> >use these two servers at the same time?
> Yes, absolutely - just run them on different ports (assuming you're
> connecting on TCP/IP). Set the "port" directive in postgresql.conf, and
> restart.

for RHEL/Fedora/Centos type Linux systems using the PGDG RPMs from the
yum repository, create a file

/etc/sysconfig/pgsql/postgresql-XX

(where postgresql-XX is the name of the init.d start/stop script for the
version you're wanting to munge), and insert into that file the line...

PGPORT=5433
PGDATA=/u01/pgsql/9.2/data

(or whatever). you can add other environment variables that are used by
the server.

you can also use this trick to run more than one instance of the same
version of postgresql. first copy /etc/rc.d/init.d/postgresql-9.2 to
another name, say postgresql-9.2B and then create
/etc/sysconfig/pgsql/postgresql-9.2B with the alternate vales you want
to use. now, `service postgresql-9.2B initdb` and start/stop it etc.

--
john r pierce 37N 122W
somewhere on the middle of the left coast

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ben Chobot 2013-05-28 17:35:50 Re: 2 postgresql server on the same station : conflict?
Previous Message Adrian Klaver 2013-05-28 14:46:47 Re: Restore a pgsql base from openERP v5(ubuntu) to v7(windows7)