Postgresql – Tutorial for installing and setting up ‘streaming replication’ with PostgreSQL on Windows XP

linuxpostgresqlwindows

Please refer to the diagram in the link below. While looking at my goals.

http://i.stack.imgur.com/GkVWb.png

GOAL:

  1. Get PostgreSQL 9.1 running on 3 terminals on the 'on site' location.
  2. 'on site' have 'streaming replication' running between these DB's 'on-site' locations.
  3. 'on site' have fail-over to one of the 'on-site' 'slaves'.
  4. between 'master' 'on site' and 'slave data warehouse' I'll just pull log files.

I've read a bunch about Linux but haven't found much about Windows XP. All the machines 'on site' have the same hardware. Unfortunately I can't use linux in the 'on site' environment.

Again been googling but not finding much anyone know of a good tutorial(s) to get this type of setup pieced together!

I'm going to keep looking and if I find anything I'll make sure to post it back here.

Thanks!

Best Answer

This is an old question but figured I would provide some pointers here. The first place to start, naturally, is with the documentation, which is excellent. It will work exactly as written on any supported OS.

This being said, if you are on Windows, some of the specifics of PostgreSQL are sufficiently UNIXy to be confusing. Its thus helpful to remember what streaming replication is in PostgreSQL, which is a continuous disaster recovery which never completes. So in addition to the replication docs you want to read all about point in time recovery and incremental backups.

The key aspects of replication is the recovery.conf which configures the PostgreSQL system to basically continually recover to now() with logs provided by another server. If you think about it from that perspective, the docs and tutorials make more sense. You do need to know where the data directory of Postgresql is however.