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"
# - 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 -
: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 => [
: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"
: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"
:wal_buffers => "1024kB",
:wal_writer_delay => "500ms",
:commit_delay => "10000",
- :checkpoint_segments => "60"
+ :checkpoint_segments => "60",
+ :max_wal_size => "2880MB"
}
}
},