From a26a8b173f903cf338c1749a4238c3710c17726c Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 11 Oct 2017 18:53:25 +0100 Subject: [PATCH 1/1] Switch postgres replication to use WAL-E --- roles/db-master.rb | 2 +- roles/db-slave.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/db-master.rb b/roles/db-master.rb index eaaca0a49..e29b7131c 100644 --- a/roles/db-master.rb +++ b/roles/db-master.rb @@ -8,7 +8,7 @@ default_attributes( :defaults => { :wal_level => "hot_standby", :archive_mode => "on", - :archive_command => "/bin/cp %p /store/postgresql/archive/%f", + :archive_command => "/usr/local/bin/openstreetmap-wal-e --terse wal-push %p", :max_wal_senders => "3", :late_authentication_rules => [ { :database => "replication", :user => "replication", :address => "146.179.159.168/32" }, diff --git a/roles/db-slave.rb b/roles/db-slave.rb index 03b6fd89b..3f7fa44f2 100644 --- a/roles/db-slave.rb +++ b/roles/db-slave.rb @@ -15,7 +15,7 @@ default_attributes( :user => "replication", :passwords => { :bag => "db", :item => "passwords" } }, - :restore_command => "/usr/bin/rsync karm.ic.openstreetmap.org::archive/%f %p" + :restore_command => "/usr/local/bin/openstreetmap-wal-e --terse wal-fetch %f %p" } } } -- 2.39.5