This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
how_to:postgresql_replication [2013/06/28 13:47] – paul | how_to:postgresql_replication [2019/02/06 17:10] (current) – [PostgreSQL Replication] paul | ||
---|---|---|---|
Line 9: | Line 9: | ||
Both the Master and Slave PCs should have VPOP3 installed into the same location (eg c:\vpop3 or d:\vpop3, etc), or settings relating to paths will not work if you have to fail over to the Slave PC. Alternatively, | Both the Master and Slave PCs should have VPOP3 installed into the same location (eg c:\vpop3 or d:\vpop3, etc), or settings relating to paths will not work if you have to fail over to the Slave PC. Alternatively, | ||
+ | (We can help set this up database replication for you if you wish, but this will be chargeable - the current rate is £150 + VAT for a simple setup (ie replicating over a LAN with file sharing available between the two PCs). If you have a more complicated setup (eg replicating over the Internet) this can be more complex as it can involve configuring VPNs etc, so the cost may be greater) | ||
=====On the Master PC===== | =====On the Master PC===== | ||
* In the VPOP3\pgsql\data folder, find the file **postgresql.conf** and edit it using Notepad or another text editor. At the bottom of the file add the lines: | * In the VPOP3\pgsql\data folder, find the file **postgresql.conf** and edit it using Notepad or another text editor. At the bottom of the file add the lines: | ||
Line 14: | Line 15: | ||
wal_level = hot_standby | wal_level = hot_standby | ||
archive_mode = on | archive_mode = on | ||
- | archive_command = 'copy %p \\\\192.168.1.10\\pgsql\\db_replication' | + | archive_command = 'copy %p \\\\192.168.1.10\\pgsql\\db_replication\\%f' |
max_wal_senders = 5 | max_wal_senders = 5 | ||
wal_keep_segments = 128 | wal_keep_segments = 128 | ||
Line 51: | Line 52: | ||
trigger_file = ' | trigger_file = ' | ||
restore_command = 'copy \\\\192.168.1.10\\pgsql\\db_replication\\%f %p' | restore_command = 'copy \\\\192.168.1.10\\pgsql\\db_replication\\%f %p' | ||
- | archive_cleanup_command = ' | + | archive_cleanup_command = 'c: |
* Start the VPOP3DB service on the Standby PC | * Start the VPOP3DB service on the Standby PC |