From 5fa5a79ec9f93b9be432f21854355cbc2cef2eab Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 9 Oct 2013 22:31:46 +0100 Subject: [PATCH] Allow cpu_tuple_cost to be configured for postgres --- cookbooks/postgresql/attributes/default.rb | 1 + cookbooks/postgresql/templates/default/postgresql.conf.erb | 1 + 2 files changed, 2 insertions(+) diff --git a/cookbooks/postgresql/attributes/default.rb b/cookbooks/postgresql/attributes/default.rb index 1bfdb836a..bb6b0fd88 100644 --- a/cookbooks/postgresql/attributes/default.rb +++ b/cookbooks/postgresql/attributes/default.rb @@ -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" diff --git a/cookbooks/postgresql/templates/default/postgresql.conf.erb b/cookbooks/postgresql/templates/default/postgresql.conf.erb index 01b796862..42e6f8876 100644 --- a/cookbooks/postgresql/templates/default/postgresql.conf.erb +++ b/cookbooks/postgresql/templates/default/postgresql.conf.erb @@ -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] %> #------------------------------------------------------------------------------ -- 2.39.5