https://bit.ly/2Pi2nfw NucleusTechnologies secret sale page.
PostgreSQL: WAL shipping and Streaming Replication ###################################### - PostgreSQL version 9.6 - Master : 192.168.13.46 - Slave : 192.168.13.61 //STEP 1: MASTER - Change "Log on as" to user with write permissions for your archive folder (for this : \\192.168.13.12\archive - Control Machine) - Stop postgres service(services.msc) SLAVE - Change "Log on as" to user with write permissions for your archive folder - Stop postgres service(services.msc) //STEP 2:Master Configuration - Go to " C:\Program Files\PostgreSQL\9.6\data\ - Open postgresql.conf listen_address = '*' //choose adapter to listen val_level = hot_standby archive_command = 'copy "%p" "\\\\192.168.13.12\\archive\\%f"' //Command : copy wal files to remote storage - 'copy "%p(xlog_file_path)" "\\\\remote_server\\archive_folder\%f(wal_file_name) "' archive_mode = on //Change archive to :on max_val_senders = 1 //Enable and define walsender processes number wal_keep_segments = 10 //Enable and define the number of Wal files - Save and close postgresql.conf - Open pg_hba.conf host replication postgres 192.168.13.61/32 trust - Save and close pg_hba.conf //STEP 3: Slave Configuration - Go to " C:\Program Files\PostgreSQL\9.6\data\postgresql.conf listen_address = '*' hot_standby = on - Save and close postgresql.conf - Create a new file and name it recovery.conf - Open recovery.conf Add line: restore_command = 'copy "path to your archive folder\\%f" "%p"' restore_command = 'copy "\\\\192.168.13.12\\archive\\%f" "%p"' standby_mode = 'on' Add line: primary_conninfo = 'host = Master IP port = 5432 user = user password = ****' primary_conninfo = 'host = 192.168.13.46 port = 5432 user = postgres password = postgres' - Save and close //STEP 4: Run first backup and copy Master files to Slave - Start "Master" Postgres Service - Open postgres Shell on "Master" - After login, type: select pg_start_backup('name'); postgres=# select pg_start_backup('base'); - Then go to the Data directory and copy all except from .conf files and postmaster.pid and Paste all to Slave data directory - Stop backup, type: select pg_stop_backup(); postgres=# select pg_stop_backup(); - Start "Slave" Postgres Service - Configuration is done Note: The "Slave" Database is read-only and it's getting updates in two ways; 1). TCP Stream 2). Wal shipping - If one of them fails the other will continue to update.