Disable the postgres JIT on tile servers
authorTom Hughes <tom@compton.nu>
Mon, 30 Mar 2020 18:11:38 +0000 (19:11 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 30 Mar 2020 18:12:31 +0000 (19:12 +0100)
cookbooks/postgresql/attributes/default.rb
cookbooks/postgresql/templates/default/postgresql.conf.erb
roles/tile.rb

index 91ffbea5e7b227cf3e9fb4de81cd3b8e0fe363c4..21beec74eb1e1b4a63a7bae1e9c7cf91a6435a79 100644 (file)
@@ -26,6 +26,7 @@ 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][:jit] = "on"
 default[:postgresql][:settings][:defaults][:log_min_duration_statement] = "-1"
 default[:postgresql][:settings][:defaults][:track_activity_query_size] = "1024"
 default[:postgresql][:settings][:defaults][:autovacuum_max_workers] = "3"
index 6e9e29d6fb9a87ad6206f547e4390db6249428ea..6022ea6c5801ae2a57efa69522e6435fa31ea2f3 100644 (file)
@@ -102,8 +102,14 @@ random_page_cost = <%= @settings[:random_page_cost] || @defaults[:random_page_co
 cpu_tuple_cost = <%= @settings[:cpu_tuple_cost] || @defaults[:cpu_tuple_cost] %>
 effective_cache_size = <%= @settings[:effective_cache_size] || @defaults[:effective_cache_size] %>
 
+# - Other Planner Options -
+
+<% if @version.to_f >= 12 -%>
+jit = <%= @settings[:jit] || @defaults[:jit] %>
+<% end -%>
+
 #------------------------------------------------------------------------------
-# ERROR REPORTING AND LOGGING
+# REPORTING AND LOGGING
 #------------------------------------------------------------------------------
 
 # - When to Log -
index 03ed0e9b0d55cad0de77fbf4d54d57bbeaec2f4c..d726d29d1ba8c4d1cff9cb99174ef02434682494 100644 (file)
@@ -44,6 +44,7 @@ default_attributes(
         :checkpoint_segments => "60",
         :max_wal_size => "2880MB",
         :random_page_cost => "1.1",
+        :jit => "off",
         :track_activity_query_size => "16384",
         :autovacuum_vacuum_scale_factor => "0.05",
         :autovacuum_analyze_scale_factor => "0.02"