]> git.openstreetmap.org Git - chef.git/commitdiff
Add max_wal_size support for postgresql 9.5
authorTom Hughes <tom@compton.nu>
Mon, 15 Aug 2016 18:28:50 +0000 (19:28 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 15 Aug 2016 18:28:50 +0000 (19:28 +0100)
cookbooks/postgresql/attributes/default.rb
cookbooks/postgresql/templates/default/postgresql.conf.erb
roles/db.rb
roles/nominatim.rb
roles/owl.rb
roles/tile.rb

index bb6b0fd88c75d3f0e5f47fd3fc5eb00fcc7582bb..42939d7cd498cc4c14abf06a84aa7feb7e38ee57 100644 (file)
@@ -15,6 +15,8 @@ default[:postgresql][:settings][:defaults][:wal_writer_delay] = "200ms"
 default[:postgresql][:settings][:defaults][:commit_delay] = "0"
 default[:postgresql][:settings][:defaults][:checkpoint_segments] = "3"
 default[:postgresql][:settings][:defaults][:checkpoint_timeout] = "5min"
+default[:postgresql][:settings][:defaults][:max_wal_size] = "1GB"
+default[:postgresql][:settings][:defaults][:min_wal_size] = "80MB"
 default[:postgresql][:settings][:defaults][:checkpoint_completion_target] = "0.5"
 default[:postgresql][:settings][:defaults][:archive_mode] = "off"
 default[:postgresql][:settings][:defaults][:max_wal_senders] = "0"
index 754131e73ea1ba68ff665f6d818b2f70dba2f4c0..850fc1b3c309525e128681403b9f9f847736459c 100644 (file)
@@ -58,10 +58,14 @@ commit_delay = <%= @settings[:commit_delay] || @defaults[:commit_delay] %>
 
 # - Checkpoints -
 
-<% if @version.to_f < 9.5 %>
+<% if @version.to_f < 9.5 -%>
 checkpoint_segments = <%= @settings[:checkpoint_segments] || @defaults[:checkpoint_segments] %>
 <% end -%>
 checkpoint_timeout = <%= @settings[:checkpoint_timeout] || @defaults[:checkpoint_timeout] %>
+<% if @version.to_f >= 9.5 -%>
+max_wal_size = <%= @settings[:max_wal_size] || @defaults[:max_wal_size] %>
+min_wal_size = <%= @settings[:min_wal_size] || @defaults[:min_wal_size] %>
+<% end -%>
 checkpoint_completion_target = <%= @settings[:checkpoint_completion_target] || @defaults[:checkpoint_completion_target] %>
 
 # - Archiving -
index df79f702e31c1f75ffb871b243b00724a06e8958..aa8679ddf840bae160303dd0d363d2346cda5885 100644 (file)
@@ -46,6 +46,7 @@ default_attributes(
         :max_connections => "600",
         :max_stack_depth => "7MB",
         :checkpoint_segments => "32",
+        :max_wal_size => "1536MB",
         :checkpoint_completion_target => "0.8",
         :cpu_tuple_cost => "0.1",
         :late_authentication_rules => [
index 041cd0e13c8d3b7c7d13860d7a71dfcfda03f5b4..81fc388bef760788dd2a6ab4eb35658824d48dc1 100644 (file)
@@ -29,6 +29,7 @@ default_attributes(
         :synchronous_commit => "off",
         :checkpoint_segments => "32",
         :checkpoint_timeout => "10min",
+        :max_wal_size => "1536MB",
         :checkpoint_completion_target => "0.9",
         :shared_buffers => "2GB",
         :autovacuum_max_workers => "1"
index 44f44c62f7da7f3e88b2d05860dc78509ab7d115..08d7b2f877eb49f9f9dd7af648f9d79b5da8ac54 100644 (file)
@@ -29,6 +29,7 @@ default_attributes(
       :defaults => {
         :fsync => "off",
         :checkpoint_segments => "30",
+        :max_wal_size => "1440MB",
         :checkpoint_completion_target => "0.9",
         :random_page_cost => "2.0",
         :log_min_duration_statement => "3000"
index 9849fed4bff6e2f8679eaa426282df68823f71a7..433805febaa6b8b0d61516b564b70aff913ea551 100644 (file)
@@ -30,7 +30,8 @@ default_attributes(
         :wal_buffers => "1024kB",
         :wal_writer_delay => "500ms",
         :commit_delay => "10000",
-        :checkpoint_segments => "60"
+        :checkpoint_segments => "60",
+        :max_wal_size => "2880MB"
       }
     }
   },