Re: Run 2 versions of Postgresql on one machine? - Mailing list pgsql-general

From Peter Alberer
Subject Re: Run 2 versions of Postgresql on one machine?
Date
Msg-id 000901c3ecc5$b7d6b580$5be0d089@ekelhardt
Whole thread Raw
In response to Run 2 versions of Postgresql on one machine?  ("Wei Wang" <ww220@cam.ac.uk>)
Responses Re: Run 2 versions of Postgresql on one machine?
List 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.


pgsql-general by date:

Previous
From: "Wei Wang"
Date:
Subject: Run 2 versions of Postgresql on one machine?
Next
From: "Andy Kriger"
Date:
Subject: how can I select into an array?