Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2012

    Question Unanswered: Replication error in postgres

    I am trying to replicate a master server to a standby server in windows server2008 r2 through these processes in postgresql.


    This 6-step guide, and all of the examples in this tutorial, assume that you have a master server at and a standby server at and that your database and its configuration files are installed at /var/lib/postgresql/data. Replace those with whatever your actual server addresses and directories are.
    1. Edit postgresql.conf on the master to turn on streaming replication. Change these settings:
    listen_address = '*'
    wal_level = hot_standby
    max_wal_senders = 3
    2. Edit pg_hba.conf on the master in order to let the standby connect.
    host replication all trust
    3. Edit recovery.conf and postgresql.conf on the standby to start up replication and hot standby. First, in postgresql.conf, change this line:
    hot_standby = on
    Then create a file in the standby's data directory (which is often the same directory as postgresql.conf and pg_hba.conf, except on some Linux distributions such as Debian and Ubuntu), called recovery.conf, with the following lines:
    standby_mode = 'on'
    primary_conninfo = 'host='
    4. Shutdown the master and copy the files. You want to copy most but not all files between the two servers, excluding the configuration files and the pg_xlog directory. An example rsync script would be:
    rsync -av --exclude pg_xlog --exclude postgresql.conf data/*
    5. Start the standby first, so that they can't get out of sync.
    6. Start the master.
    Is taking down the master for long enough to copy the files too long? Then you need the 10-minute version.
    Starting Replication with only a Quick Master Restart
    while doing step 4 mannually,all files are getting copied from master server to standby server including .conf files.
    And if i am doing step 5, standby server is not starting.
    Please guide me in replication process.

  2. #2
    Join Date
    Jun 2010
    Below link gives more information to configure Streaming Replication:

    Streaming Replication - PostgreSQL wiki


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts