Allow cpu_tuple_cost to be configured for postgres
authorTom Hughes <tom@compton.nu>
Wed, 9 Oct 2013 21:31:46 +0000 (22:31 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 9 Oct 2013 21:31:46 +0000 (22:31 +0100)
cookbooks/postgresql/attributes/default.rb
cookbooks/postgresql/templates/default/postgresql.conf.erb

index 1bfdb83..bb6b0fd 100644 (file)
@@ -21,6 +21,7 @@ default[:postgresql][:settings][:defaults][:max_wal_senders] = "0"
 default[:postgresql][:settings][:defaults][:hot_standby] = "off"
 default[:postgresql][:settings][:defaults][:hot_standby_feedback] = "off"
 default[:postgresql][:settings][:defaults][:random_page_cost] = "4.0"
+default[:postgresql][:settings][:defaults][:cpu_tuple_cost] = "0.01"
 default[:postgresql][:settings][:defaults][:effective_cache_size] = "128MB"
 default[:postgresql][:settings][:defaults][:log_min_duration_statement] = "-1"
 default[:postgresql][:settings][:defaults][:autovacuum_max_workers] = "3"
index 01b7968..42e6f88 100644 (file)
@@ -85,6 +85,7 @@ hot_standby_feedback = <%= @settings[:hot_standby_feedback] || @defaults[:hot_st
 # - Planner Cost Constants -
 
 random_page_cost = <%= @settings[:random_page_cost] || @defaults[:random_page_cost] %>
+cpu_tuple_cost = <%= @settings[:cpu_tuple_cost] || @defaults[:cpu_tuple_cost] %>
 effective_cache_size = <%= @settings[:effective_cache_size] || @defaults[:effective_cache_size] %>
 
 #------------------------------------------------------------------------------