Increase track_activity_query_size to 16Kb on tile servers
authorTom Hughes <tom@compton.nu>
Sun, 18 Sep 2016 17:40:58 +0000 (18:40 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 18 Sep 2016 17:40:58 +0000 (18:40 +0100)
Closes #92

cookbooks/postgresql/attributes/default.rb
cookbooks/postgresql/templates/default/postgresql.conf.erb
roles/tile.rb

index 42939d7..6a5d686 100644 (file)
@@ -26,6 +26,7 @@ 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][:track_activity_query_size] = "1024"
 default[:postgresql][:settings][:defaults][:autovacuum_max_workers] = "3"
 default[:postgresql][:settings][:defaults][:user_name_maps] = {}
 default[:postgresql][:settings][:defaults][:early_authentication_rules] = []
index 850fc1b..4bfe74f 100644 (file)
@@ -110,6 +110,14 @@ log_min_duration_statement = <%= @settings[:log_min_duration_statement] || @defa
 
 log_line_prefix = '%t '
 
+#------------------------------------------------------------------------------
+# RUNTIME STATISTICS
+#------------------------------------------------------------------------------
+
+# - Query/Index Statistics Collector -
+
+track_activity_query_size = <%= @settings[:track_activity_query_size] || @defaults[:track_activity_query_size] %>
+
 #------------------------------------------------------------------------------
 # AUTOVACUUM PARAMETERS
 #------------------------------------------------------------------------------
index a0b0e4a..300c826 100644 (file)
@@ -40,7 +40,8 @@ default_attributes(
         :wal_writer_delay => "500ms",
         :commit_delay => "10000",
         :checkpoint_segments => "60",
-        :max_wal_size => "2880MB"
+        :max_wal_size => "2880MB",
+        :track_activity_query_size => "16384"
       }
     }
   },