]> git.openstreetmap.org Git - chef.git/commitdiff
Switch postgres replication to use WAL-E
authorTom Hughes <tom@compton.nu>
Wed, 11 Oct 2017 17:53:25 +0000 (18:53 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 11 Oct 2017 17:53:25 +0000 (18:53 +0100)
roles/db-master.rb
roles/db-slave.rb

index eaaca0a4957fc29c8f94472b8c4d0dd3d9817ef9..e29b7131c31a443a1b292564262890fdac5e8ecc 100644 (file)
@@ -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" },
index 03b6fd89b3c930954576794ba0884a5ac4e223b2..3f7fa44f2724a99b2419907e277e07974a53c5dc 100644 (file)
@@ -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"
       }
     }
   }