]> git.openstreetmap.org Git - chef.git/commitdiff
postgresql: add seq_scan_cost setting
authorSarah Hoffmann <lonvia@denofr.de>
Thu, 24 Aug 2023 08:38:06 +0000 (10:38 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 24 Aug 2023 08:38:06 +0000 (10:38 +0200)
cookbooks/postgresql/attributes/default.rb
cookbooks/postgresql/templates/default/postgresql.conf.erb

index 88942aa6f8bc85525719a67f72ad21163ba55162..1123f4f1a98a1e422dd3cdc2043d57657a488fe9 100644 (file)
@@ -28,6 +28,7 @@ default[:postgresql][:settings][:defaults][:max_wal_senders] = "10"
 default[:postgresql][:settings][:defaults][:max_replication_slots] = "10"
 default[:postgresql][:settings][:defaults][:hot_standby] = "on"
 default[:postgresql][:settings][:defaults][:hot_standby_feedback] = "off"
+default[:postgresql][:settings][:defaults][:seq_page_cost] = "1.0"
 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] = "4GB"
index a8bc83c05fd1805b9515aa13d3b2650b4e8461b9..9fba27e6ee43291d3d6064def7f4a29e3b301e14 100644 (file)
@@ -104,6 +104,7 @@ hot_standby_feedback = <%= @settings[:hot_standby_feedback] || @defaults[:hot_st
 
 # - Planner Cost Constants -
 
+seq_page_cost = <%= @settings[:seq_page_cost] || @defaults[:seq_page_cost] %>
 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] %>