Re: Run 2 versions of Postgresql on one machine?

From: "Peter Alberer" <h9351252(at)obelix(dot)wu-wien(dot)ac(dot)at>
To: "'Wei Wang'" <ww220(at)cam(dot)ac(dot)uk>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Run 2 versions of Postgresql on one machine?
Date: 2004-02-06 15:27:17
Message-ID: 000901c3ecc5$b7d6b580$5be0d089@ekelhardt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi wei,

it is quite easy to have two different version of postgres running on
one machine. You need 2 different directories for the data files and 2
different ports for the 2 postmasters to listen.

-first you prepare the data directories with initdb, you can use the -D
parameter to give the location of the files.
-then start the database (postmaster) with parameter -p PORTNUMBER.
Default port is 5432 so your existing postmaster process will probably
listen there. The new version should listen on another port. All of the
other Postgres utilities (pgsql, createdb, ...) also need the -p
PORTNUMBER info as well, so they can connect to the right postmaster
process.

Hope that helps,

peter

ps: if you install from the Postgres source, you can specify a new
default port number for your installation via a ./configure switch.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andy Kriger 2004-02-06 15:37:08 how can I select into an array?
Previous Message Wei Wang 2004-02-06 15:01:35 Run 2 versions of Postgresql on one machine?