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?