how to configure postgresql 9.2 streaming replication?

18
2014-04
  • Hitesh

    I am new in postgresql 9.2. I want to achive streaming replication (master-slave) in windows xp os enviorment .

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    PostgreSQL replication
  • user80301

    I am looking at replication of the master database (PostgreSQL) and this is the configuration I have to setup

    master -- hot-standby (hs)
    |
    |
    --- read only slave (r1)
    |
    |
    --- read only slave (r2)
    

    My requirement is that the either of master or standby should be available all the time and r1-r2 should be available most of the time.

    I have setup streaming replication with recovery on hs and without recovery on r1,r2. All these 3 get the WAL logs from master.

    My question is, when the master goes down and we trigger the failover on standby, what should I do to r1 and r2 ? re-parenting them to standby would mean a full base-backup and when eventually master comes up, i may need to re-parent again.

    This is my first attempt at replication-setup. So if there is anything obvious I am missing or doing wrong, please let me know. If there are tools/solutions which cater to this sort of a thing, I would be very glad to know and learn.


  • Related Answers
  • coredump

    Take a look on pgpool-II, it allows load balancing, connection pooling and dealing with the hot standby server. It will help you with that setup.