]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/postgresql/templates/default/postgresql.conf.erb
nominatim: switch stormfly back to php frontend
[chef.git] / cookbooks / postgresql / templates / default / postgresql.conf.erb
index 6b38d55d62b6f1cacf7111acf9aa35823cf512ad..a8bc83c05fd1805b9515aa13d3b2650b4e8461b9 100644 (file)
@@ -20,11 +20,7 @@ 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'
 unix_socket_directories = '/var/run/postgresql'
-<% else -%>
-unix_socket_directory = '/var/run/postgresql'
-<% end -%>
 
 # - Security and Authentication -
 
 
 # - Security and Authentication -
 
@@ -47,12 +43,8 @@ max_stack_depth = <%= @settings[:max_stack_depth] || @defaults[:max_stack_depth]
 
 effective_io_concurrency = <%= @settings[:effective_io_concurrency] || @defaults[:effective_io_concurrency] %>
 max_worker_processes = <%= @settings[:max_worker_processes] || @defaults[:max_worker_processes] %>
 
 effective_io_concurrency = <%= @settings[:effective_io_concurrency] || @defaults[:effective_io_concurrency] %>
 max_worker_processes = <%= @settings[:max_worker_processes] || @defaults[:max_worker_processes] %>
-<% if @version.to_f >= 9.6 -%>
 max_parallel_workers_per_gather = <%= @settings[:max_parallel_workers_per_gather] || @defaults[:max_parallel_workers_per_gather] %>
 max_parallel_workers_per_gather = <%= @settings[:max_parallel_workers_per_gather] || @defaults[:max_parallel_workers_per_gather] %>
-<% end -%>
-<% if @version.to_f >= 10 -%>
 max_parallel_workers = <%= @settings[:max_parallel_workers] || @defaults[:max_parallel_workers] %>
 max_parallel_workers = <%= @settings[:max_parallel_workers] || @defaults[:max_parallel_workers] %>
-<% end -%>
 
 #------------------------------------------------------------------------------
 # WRITE AHEAD LOG
 
 #------------------------------------------------------------------------------
 # WRITE AHEAD LOG
@@ -69,15 +61,10 @@ commit_delay = <%= @settings[:commit_delay] || @defaults[:commit_delay] %>
 
 # - Checkpoints -
 
 
 # - Checkpoints -
 
-<% if @version.to_f < 9.5 -%>
-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 -%>
+checkpoint_completion_target = <%= @settings[:checkpoint_completion_target] || @defaults[:checkpoint_completion_target] %>
 max_wal_size = <%= @settings[:max_wal_size] || @defaults[:max_wal_size] %>
 min_wal_size = <%= @settings[:min_wal_size] || @defaults[:min_wal_size] %>
 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 -
 
 
 # - Archiving -
 
@@ -86,6 +73,14 @@ archive_mode = <%= @settings[:archive_mode] || @defaults[:archive_mode] %>
 archive_command = '<%= @settings[:archive_command] || @defaults[:archive_command] %>'
 <% end -%>
 
 archive_command = '<%= @settings[:archive_command] || @defaults[:archive_command] %>'
 <% end -%>
 
+# - Archive Recovery -
+
+# These are only used in recovery mode.
+
+<% if @settings[:restore_command] || @defaults[:restore_command] -%>
+restore_command = '<%= @settings[:restore_command] || @defaults[:restore_command] %>'
+<% end -%>
+
 #------------------------------------------------------------------------------
 # REPLICATION
 #------------------------------------------------------------------------------
 #------------------------------------------------------------------------------
 # REPLICATION
 #------------------------------------------------------------------------------
@@ -93,12 +88,13 @@ archive_command = '<%= @settings[:archive_command] || @defaults[:archive_command
 # - Sending Server(s) -
 
 max_wal_senders = <%= @settings[:max_wal_senders] || @defaults[:max_wal_senders] %>
 # - Sending Server(s) -
 
 max_wal_senders = <%= @settings[:max_wal_senders] || @defaults[:max_wal_senders] %>
-<% if @version.to_f >= 9.4 -%>
 max_replication_slots = <%= @settings[:max_replication_slots] || @defaults[:max_replication_slots] %>
 max_replication_slots = <%= @settings[:max_replication_slots] || @defaults[:max_replication_slots] %>
-<% end -%>
 
 # - Standby Servers -
 
 
 # - Standby Servers -
 
+<% if @primary_conninfo -%>
+primary_conninfo = 'host=<%= @primary_conninfo[:host] %> port=<%= @primary_conninfo[:port] %> user=<%= @primary_conninfo[:user] %> password=<%= @passwords[@primary_conninfo[:user]] %>'
+<% end -%>
 hot_standby = <%= @settings[:hot_standby] || @defaults[:hot_standby] %>
 hot_standby_feedback = <%= @settings[:hot_standby_feedback] || @defaults[:hot_standby_feedback] %>
 
 hot_standby = <%= @settings[:hot_standby] || @defaults[:hot_standby] %>
 hot_standby_feedback = <%= @settings[:hot_standby_feedback] || @defaults[:hot_standby_feedback] %>
 
@@ -115,9 +111,7 @@ effective_cache_size = <%= @settings[:effective_cache_size] || @defaults[:effect
 # - Other Planner Options -
 
 default_statistics_target = <%= @settings[:default_statistics_target] || @defaults[:default_statistics_target] %>
 # - Other Planner Options -
 
 default_statistics_target = <%= @settings[:default_statistics_target] || @defaults[:default_statistics_target] %>
-<% if @version.to_f >= 12 -%>
 jit = <%= @settings[:jit] || @defaults[:jit] %>
 jit = <%= @settings[:jit] || @defaults[:jit] %>
-<% end -%>
 
 #------------------------------------------------------------------------------
 # REPORTING AND LOGGING
 
 #------------------------------------------------------------------------------
 # REPORTING AND LOGGING
@@ -129,6 +123,7 @@ log_min_duration_statement = <%= @settings[:log_min_duration_statement] || @defa
 
 # - What to Log -
 
 
 # - What to Log -
 
+log_autovacuum_min_duration = <%= @settings[:log_autovacuum_min_duration] || @defaults[:log_autovacuum_min_duration] %>
 log_line_prefix = '%t '
 
 #------------------------------------------------------------------------------
 log_line_prefix = '%t '
 
 #------------------------------------------------------------------------------
@@ -138,6 +133,9 @@ log_line_prefix = '%t '
 # - Query/Index Statistics Collector -
 
 track_activity_query_size = <%= @settings[:track_activity_query_size] || @defaults[:track_activity_query_size] %>
 # - Query/Index Statistics Collector -
 
 track_activity_query_size = <%= @settings[:track_activity_query_size] || @defaults[:track_activity_query_size] %>
+<% if @version.to_f < 15 -%>
+stats_temp_directory = '/run/postgresql/<%= @version %>-main.pg_stat_tmp'
+<% end -%>
 
 #------------------------------------------------------------------------------
 # AUTOVACUUM PARAMETERS
 
 #------------------------------------------------------------------------------
 # AUTOVACUUM PARAMETERS
@@ -147,6 +145,8 @@ autovacuum_max_workers = <%= @settings[:autovacuum_max_workers] || @defaults[:au
 autovacuum_naptime = <%= @settings[:autovacuum_naptime] || @defaults[:autovacuum_naptime] %>
 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] %>
 autovacuum_naptime = <%= @settings[:autovacuum_naptime] || @defaults[:autovacuum_naptime] %>
 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] %>
+autovacuum_freeze_max_age = <%= @settings[:autovacuum_freeze_max_age] || @defaults[:autovacuum_freeze_max_age] %>
+autovacuum_multixact_freeze_max_age = <%= @settings[:autovacuum_multixact_freeze_max_age] || @defaults[:autovacuum_multixact_freeze_max_age] %>
 
 #------------------------------------------------------------------------------
 # CLIENT CONNECTION DEFAULTS
 
 #------------------------------------------------------------------------------
 # CLIENT CONNECTION DEFAULTS