]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/postgresql/templates/default/postgresql.conf.erb
dulcy: switch to postgresql 12
[chef.git] / cookbooks / postgresql / templates / default / postgresql.conf.erb
index 01b796862cd1d7f208d2c3f923e2f317d70de201..6e9e29d6fb9a87ad6206f547e4390db6249428ea 100644 (file)
@@ -20,7 +20,11 @@ listen_addresses = '<%= @settings[:listen_addresses] || @defaults[:listen_addres
 <% end -%>
 port = <%= @settings[:port] || @defaults[:port] %>
 max_connections = <%= @settings[:max_connections] || @defaults[:max_connections] %>
 <% end -%>
 port = <%= @settings[:port] || @defaults[:port] %>
 max_connections = <%= @settings[:max_connections] || @defaults[:max_connections] %>
+<% if @version.to_f >= 9.3 %>
+unix_socket_directories = '/var/run/postgresql'
+<% else -%>
 unix_socket_directory = '/var/run/postgresql'
 unix_socket_directory = '/var/run/postgresql'
+<% end -%>
 
 # - Security and Authentication -
 
 
 # - Security and Authentication -
 
@@ -39,6 +43,10 @@ work_mem = <%= @settings[:work_mem] || @defaults[:work_mem] %>
 maintenance_work_mem = <%= @settings[:maintenance_work_mem] || @defaults[:maintenance_work_mem] %>
 max_stack_depth = <%= @settings[:max_stack_depth] || @defaults[:max_stack_depth] %>
 
 maintenance_work_mem = <%= @settings[:maintenance_work_mem] || @defaults[:maintenance_work_mem] %>
 max_stack_depth = <%= @settings[:max_stack_depth] || @defaults[:max_stack_depth] %>
 
+# - Asynchronous Behavior -
+
+effective_io_concurrency = <%= @settings[:effective_io_concurrency] || @defaults[:effective_io_concurrency] %>
+
 #------------------------------------------------------------------------------
 # WRITE AHEAD LOG
 #------------------------------------------------------------------------------
 #------------------------------------------------------------------------------
 # WRITE AHEAD LOG
 #------------------------------------------------------------------------------
@@ -54,8 +62,14 @@ commit_delay = <%= @settings[:commit_delay] || @defaults[:commit_delay] %>
 
 # - Checkpoints -
 
 
 # - Checkpoints -
 
+<% if @version.to_f < 9.5 -%>
 checkpoint_segments = <%= @settings[:checkpoint_segments] || @defaults[:checkpoint_segments] %>
 checkpoint_segments = <%= @settings[:checkpoint_segments] || @defaults[:checkpoint_segments] %>
+<% end -%>
 checkpoint_timeout = <%= @settings[:checkpoint_timeout] || @defaults[:checkpoint_timeout] %>
 checkpoint_timeout = <%= @settings[:checkpoint_timeout] || @defaults[:checkpoint_timeout] %>
+<% if @version.to_f >= 9.5 -%>
+max_wal_size = <%= @settings[:max_wal_size] || @defaults[:max_wal_size] %>
+min_wal_size = <%= @settings[:min_wal_size] || @defaults[:min_wal_size] %>
+<% end -%>
 checkpoint_completion_target = <%= @settings[:checkpoint_completion_target] || @defaults[:checkpoint_completion_target] %>
 
 # - Archiving -
 checkpoint_completion_target = <%= @settings[:checkpoint_completion_target] || @defaults[:checkpoint_completion_target] %>
 
 # - Archiving -
@@ -85,6 +99,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] %>
 # - 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] %>
 
 #------------------------------------------------------------------------------
 effective_cache_size = <%= @settings[:effective_cache_size] || @defaults[:effective_cache_size] %>
 
 #------------------------------------------------------------------------------
@@ -99,11 +114,21 @@ log_min_duration_statement = <%= @settings[:log_min_duration_statement] || @defa
 
 log_line_prefix = '%t '
 
 
 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
 #------------------------------------------------------------------------------
 
 autovacuum_max_workers = <%= @settings[:autovacuum_max_workers] || @defaults[:autovacuum_max_workers] %>
 #------------------------------------------------------------------------------
 # AUTOVACUUM PARAMETERS
 #------------------------------------------------------------------------------
 
 autovacuum_max_workers = <%= @settings[:autovacuum_max_workers] || @defaults[:autovacuum_max_workers] %>
+autovacuum_vacuum_scale_factor = <%= @settings[:autovacuum_vacuum_scale_factor] || @defaults[:autovacuum_vacuum_scale_factor] %>
+autovacuum_analyze_scale_factor = <%= @settings[:autovacuum_analyze_scale_factor] || @defaults[:autovacuum_analyze_scale_factor] %>
 
 #------------------------------------------------------------------------------
 # CLIENT CONNECTION DEFAULTS
 
 #------------------------------------------------------------------------------
 # CLIENT CONNECTION DEFAULTS