Postgresql – install a PostgreSQL hot standby instance on the same server

postgresqlwindows-server-2008

I'm trying to install a second instance of PostgreSQL on a server (Windows Server 2008) that already has it. I've managed to do this with different versions in the past, but in this case I want the second instance to be a hot-standby (read only replication) server for people to run reports from without affecting the production server with locks, etc. When I run the installer for version 9.2 it tells me that the database is already installed and offers to upgrade it.

Is it as simple as manually creating a duplicate Windows service entry to run that points to a different data directory? Or is this sort of behaviour not supported at all?

Best Answer

if the goal is to have a dedicated box that runs several instances on postgres, on multiple tcp/ip ports, and it sounds like this is a virgin project,.... i would highly recommend installing a quality os on the box. centos or debian are great server linux distros, or you can always for with freebsd if you feel adventerous....

once you have that going, it becomes trivial to fire up multiple postgres instaces, each on its own tcp/ip port, with its own conf file, /tmp and /data dir's.

from my experience, doing this on *nix is very straightfowrward, but attempting on windows will drive one bonkers :P