Disable the postgres JIT on tile servers
[chef.git] / cookbooks / postgresql / templates / default / postgresql.conf.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 #------------------------------------------------------------------------------
4 # FILE LOCATIONS
5 #------------------------------------------------------------------------------
6
7 data_directory = '/var/lib/postgresql/<%= @version %>/main'
8 hba_file = '/etc/postgresql/<%= @version %>/main/pg_hba.conf'
9 ident_file = '/etc/postgresql/<%= @version %>/main/pg_ident.conf'
10 external_pid_file = '/var/run/postgresql/<%= @version %>-main.pid'
11
12 #------------------------------------------------------------------------------
13 # CONNECTIONS AND AUTHENTICATION
14 #------------------------------------------------------------------------------
15
16 # - Connection Settings -
17
18 <% if @settings[:listen_addresses] || @defaults[:listen_addresses] -%>
19 listen_addresses = '<%= @settings[:listen_addresses] || @defaults[:listen_addresses] %>'
20 <% end -%>
21 port = <%= @settings[:port] || @defaults[:port] %>
22 max_connections = <%= @settings[:max_connections] || @defaults[:max_connections] %>
23 <% if @version.to_f >= 9.3 %>
24 unix_socket_directories = '/var/run/postgresql'
25 <% else -%>
26 unix_socket_directory = '/var/run/postgresql'
27 <% end -%>
28
29 # - Security and Authentication -
30
31 ssl = true
32 ssl_renegotiation_limit = 0
33
34 #------------------------------------------------------------------------------
35 # RESOURCE USAGE (except WAL)
36 #------------------------------------------------------------------------------
37
38 # - Memory -
39
40 shared_buffers = <%= @settings[:shared_buffers] || @defaults[:shared_buffers] %>
41 temp_buffers = <%= @settings[:temp_buffers] || @defaults[:temp_buffers] %>
42 work_mem = <%= @settings[:work_mem] || @defaults[:work_mem] %>
43 maintenance_work_mem = <%= @settings[:maintenance_work_mem] || @defaults[:maintenance_work_mem] %>
44 max_stack_depth = <%= @settings[:max_stack_depth] || @defaults[:max_stack_depth] %>
45
46 # - Asynchronous Behavior -
47
48 effective_io_concurrency = <%= @settings[:effective_io_concurrency] || @defaults[:effective_io_concurrency] %>
49
50 #------------------------------------------------------------------------------
51 # WRITE AHEAD LOG
52 #------------------------------------------------------------------------------
53
54 # - Settings -
55
56 wal_level = <%= @settings[:wal_level] || @defaults[:wal_level] %>
57 fsync = <%= @settings[:fsync] || @defaults[:fsync] %>
58 synchronous_commit = <%= @settings[:synchronous_commit] || @defaults[:synchronous_commit] %>
59 wal_buffers = <%= @settings[:wal_buffers] || @defaults[:wal_buffers] %>
60 wal_writer_delay = <%= @settings[:wal_writer_delay] || @defaults[:wal_writer_delay] %>
61 commit_delay = <%= @settings[:commit_delay] || @defaults[:commit_delay] %>
62
63 # - Checkpoints -
64
65 <% if @version.to_f < 9.5 -%>
66 checkpoint_segments = <%= @settings[:checkpoint_segments] || @defaults[:checkpoint_segments] %>
67 <% end -%>
68 checkpoint_timeout = <%= @settings[:checkpoint_timeout] || @defaults[:checkpoint_timeout] %>
69 <% if @version.to_f >= 9.5 -%>
70 max_wal_size = <%= @settings[:max_wal_size] || @defaults[:max_wal_size] %>
71 min_wal_size = <%= @settings[:min_wal_size] || @defaults[:min_wal_size] %>
72 <% end -%>
73 checkpoint_completion_target = <%= @settings[:checkpoint_completion_target] || @defaults[:checkpoint_completion_target] %>
74
75 # - Archiving -
76
77 archive_mode = <%= @settings[:archive_mode] || @defaults[:archive_mode] %>
78 <% if @settings[:archive_command] || @defaults[:archive_command] -%>
79 archive_command = '<%= @settings[:archive_command] || @defaults[:archive_command] %>'
80 <% end -%>
81
82 #------------------------------------------------------------------------------
83 # REPLICATION
84 #------------------------------------------------------------------------------
85
86 # - Sending Server(s) -
87
88 max_wal_senders = <%= @settings[:max_wal_senders] || @defaults[:max_wal_senders] %>
89
90 # - Standby Servers -
91
92 hot_standby = <%= @settings[:hot_standby] || @defaults[:hot_standby] %>
93 hot_standby_feedback = <%= @settings[:hot_standby_feedback] || @defaults[:hot_standby_feedback] %>
94
95 #------------------------------------------------------------------------------
96 # QUERY TUNING
97 #------------------------------------------------------------------------------
98
99 # - Planner Cost Constants -
100
101 random_page_cost = <%= @settings[:random_page_cost] || @defaults[:random_page_cost] %>
102 cpu_tuple_cost = <%= @settings[:cpu_tuple_cost] || @defaults[:cpu_tuple_cost] %>
103 effective_cache_size = <%= @settings[:effective_cache_size] || @defaults[:effective_cache_size] %>
104
105 # - Other Planner Options -
106
107 <% if @version.to_f >= 12 -%>
108 jit = <%= @settings[:jit] || @defaults[:jit] %>
109 <% end -%>
110
111 #------------------------------------------------------------------------------
112 # REPORTING AND LOGGING
113 #------------------------------------------------------------------------------
114
115 # - When to Log -
116
117 log_min_duration_statement = <%= @settings[:log_min_duration_statement] || @defaults[:log_min_duration_statement] %>
118
119 # - What to Log -
120
121 log_line_prefix = '%t '
122
123 #------------------------------------------------------------------------------
124 # RUNTIME STATISTICS
125 #------------------------------------------------------------------------------
126
127 # - Query/Index Statistics Collector -
128
129 track_activity_query_size = <%= @settings[:track_activity_query_size] || @defaults[:track_activity_query_size] %>
130
131 #------------------------------------------------------------------------------
132 # AUTOVACUUM PARAMETERS
133 #------------------------------------------------------------------------------
134
135 autovacuum_max_workers = <%= @settings[:autovacuum_max_workers] || @defaults[:autovacuum_max_workers] %>
136 autovacuum_vacuum_scale_factor = <%= @settings[:autovacuum_vacuum_scale_factor] || @defaults[:autovacuum_vacuum_scale_factor] %>
137 autovacuum_analyze_scale_factor = <%= @settings[:autovacuum_analyze_scale_factor] || @defaults[:autovacuum_analyze_scale_factor] %>
138
139 #------------------------------------------------------------------------------
140 # CLIENT CONNECTION DEFAULTS
141 #------------------------------------------------------------------------------
142
143 # - Locale and Formatting -
144
145 datestyle = 'iso, dmy'
146 lc_messages = 'en_GB.UTF-8'
147 lc_monetary = 'en_GB.UTF-8'
148 lc_numeric = 'en_GB.UTF-8'
149 lc_time = 'en_GB.UTF-8'
150 default_text_search_config = 'pg_catalog.english'