Re: Multiple postgresql installations on one machine. - Mailing list pgsql-general

From Charles Tassell
Subject Re: Multiple postgresql installations on one machine.
Date
Msg-id 4.3.2.7.2.20011012151931.00c2a410@mailer.isn.net
Whole thread Raw
In response to Multiple postgresql installations on one machine.  (Lincoln Yeoh <lyeoh@pop.jaring.my>)
Responses Re: Multiple postgresql installations on one machine.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I may be wrong, but I don't think it's possible to have them on the same port.  The problem is that the TCP/IP port defaults to the same as the UNIX sockets port, and UNIX sockets are local to the machine, so they are completely independent of IP addresses and can not be duplicated.  It is possible to run two installs on different ports though, which is what I do at work.  Postgres 6.x on port 5432, and 7.x on port 4321.  You could probably use your OS's NAT layer to redirect anything that comes in on port 5432 of the second IP to port 4321 (look at the rewrite rules of the INPUT chain with iptables under Linux) if you don't want to add the "port=xxx" to the connect string of your applications though.

At 07:04 AM 10/11/01, Lincoln Yeoh wrote:
Hi,

Is it possible to have multiple postgresql installations on one machine
running on the same port but on different IP addresses?

I've specified different IPs/hostnames for the virtual_host but the unix
socket clashes when I try.

Should I just move the unix sockets somewhere else with -k, what would the
impact be? I can't seem to tell psql where to find the moved unix socket.

Cheerio,
Link.





---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Cant get planner to use index (7.1.3-1PGDG)
Next
From: Jeff Boes
Date:
Subject: Re: PG mailing list problems (was Re: Support issues)