diff options
Diffstat (limited to 'templates/postgresql.10.conf.j2')
-rw-r--r-- | templates/postgresql.10.conf.j2 | 694 |
1 files changed, 694 insertions, 0 deletions
diff --git a/templates/postgresql.10.conf.j2 b/templates/postgresql.10.conf.j2 new file mode 100644 index 0000000..588020f --- /dev/null +++ b/templates/postgresql.10.conf.j2 | |||
@@ -0,0 +1,694 @@ | |||
1 | # {{ ansible_managed }} | ||
2 | # ----------------------------- | ||
3 | # PostgreSQL configuration file | ||
4 | # ----------------------------- | ||
5 | # | ||
6 | # This file consists of lines of the form: | ||
7 | # | ||
8 | # name = value | ||
9 | # | ||
10 | # (The "=" is optional.) Whitespace may be used. Comments are introduced with | ||
11 | # "#" anywhere on a line. The complete list of parameter names and allowed | ||
12 | # values can be found in the PostgreSQL documentation. | ||
13 | # | ||
14 | # The commented-out settings shown in this file represent the default values. | ||
15 | # Re-commenting a setting is NOT sufficient to revert it to the default value; | ||
16 | # you need to reload the server. | ||
17 | # | ||
18 | # This file is read on server startup and when the server receives a SIGHUP | ||
19 | # signal. If you edit the file on a running system, you have to SIGHUP the | ||
20 | # server for the changes to take effect, run "pg_ctl reload", or execute | ||
21 | # "SELECT pg_reload_conf()". Some parameters, which are marked below, | ||
22 | # require a server shutdown and restart to take effect. | ||
23 | # | ||
24 | # Any parameter can also be given as a command-line option to the server, e.g., | ||
25 | # "postgres -c log_connections=on". Some parameters can be changed at run time | ||
26 | # with the "SET" SQL command. | ||
27 | # | ||
28 | # Memory units: kB = kilobytes Time units: ms = milliseconds | ||
29 | # MB = megabytes s = seconds | ||
30 | # GB = gigabytes min = minutes | ||
31 | # TB = terabytes h = hours | ||
32 | # d = days | ||
33 | |||
34 | |||
35 | #------------------------------------------------------------------------------ | ||
36 | # FILE LOCATIONS | ||
37 | #------------------------------------------------------------------------------ | ||
38 | |||
39 | # The default values of these variables are driven from the -D command-line | ||
40 | # option or PGDATA environment variable, represented here as ConfigDir. | ||
41 | |||
42 | data_directory = '/var/lib/postgresql/{{ postgres_version }}/{{ postgres_cluster_name }}' # use data in another directory | ||
43 | # (change requires restart) | ||
44 | hba_file = '/etc/postgresql/{{ postgres_version }}/{{ postgres_cluster_name }}/pg_hba.conf' # host-based authentication file | ||
45 | # (change requires restart) | ||
46 | ident_file = '/etc/postgresql/{{ postgres_version }}/{{ postgres_cluster_name }}/pg_ident.conf' # ident configuration file | ||
47 | # (change requires restart) | ||
48 | |||
49 | # If external_pid_file is not explicitly set, no extra PID file is written. | ||
50 | external_pid_file = '/var/run/postgresql/{{ postgres_version }}-{{ postgres_cluster_name }}.pid' # write an extra PID file | ||
51 | # (change requires restart) | ||
52 | |||
53 | |||
54 | #------------------------------------------------------------------------------ | ||
55 | # CONNECTIONS AND AUTHENTICATION | ||
56 | #------------------------------------------------------------------------------ | ||
57 | |||
58 | # - Connection Settings - | ||
59 | |||
60 | listen_addresses = '{{ postgres_listen_addresses | reject("none") | join(",") }}' # what IP address(es) to listen on; | ||
61 | # comma-separated list of addresses; | ||
62 | # defaults to 'localhost'; use '*' for all | ||
63 | # (change requires restart) | ||
64 | port = {{ postgres_port }} # (change requires restart) | ||
65 | max_connections = 400 # (change requires restart) | ||
66 | # Note: Increasing max_connections costs ~400 bytes of shared memory per | ||
67 | # connection slot, plus lock space (see max_locks_per_transaction). | ||
68 | #superuser_reserved_connections = 3 # (change requires restart) | ||
69 | unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories | ||
70 | # (change requires restart) | ||
71 | #unix_socket_group = '' # (change requires restart) | ||
72 | #unix_socket_permissions = 0777 # begin with 0 to use octal notation | ||
73 | # (change requires restart) | ||
74 | #bonjour = off # advertise server via Bonjour | ||
75 | # (change requires restart) | ||
76 | #bonjour_name = '' # defaults to the computer name | ||
77 | # (change requires restart) | ||
78 | |||
79 | # - Security and Authentication - | ||
80 | |||
81 | #authentication_timeout = 1min # 1s-600s | ||
82 | ssl = on | ||
83 | #ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers | ||
84 | #ssl_prefer_server_ciphers = on | ||
85 | #ssl_ecdh_curve = 'prime256v1' | ||
86 | #ssl_dh_params_file = '' | ||
87 | # ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' | ||
88 | # ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' | ||
89 | #ssl_ca_file = '' | ||
90 | #ssl_crl_file = '' | ||
91 | #password_encryption = md5 # md5 or scram-sha-256 | ||
92 | #db_user_namespace = off | ||
93 | #row_security = on | ||
94 | |||
95 | # GSSAPI using Kerberos | ||
96 | #krb_server_keyfile = '' | ||
97 | #krb_caseins_users = off | ||
98 | |||
99 | # - TCP Keepalives - | ||
100 | # see "man 7 tcp" for details | ||
101 | |||
102 | #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; | ||
103 | # 0 selects the system default | ||
104 | #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; | ||
105 | # 0 selects the system default | ||
106 | #tcp_keepalives_count = 0 # TCP_KEEPCNT; | ||
107 | # 0 selects the system default | ||
108 | |||
109 | |||
110 | #------------------------------------------------------------------------------ | ||
111 | # RESOURCE USAGE (except WAL) | ||
112 | #------------------------------------------------------------------------------ | ||
113 | |||
114 | # - Memory - | ||
115 | |||
116 | {% if ansible_memtotal_mb > 65536 %} | ||
117 | shared_buffers = 16GB # min 128kB | ||
118 | {% else %} | ||
119 | shared_buffers = {{ ansible_memtotal_mb // 4 }}MB # min 128kB | ||
120 | {% endif %} | ||
121 | # (change requires restart) | ||
122 | #huge_pages = try # on, off, or try | ||
123 | # (change requires restart) | ||
124 | temp_buffers = 24MB # min 800kB | ||
125 | #max_prepared_transactions = 0 # zero disables the feature | ||
126 | # (change requires restart) | ||
127 | # Caution: it is not advisable to set max_prepared_transactions nonzero unless | ||
128 | # you actively intend to use prepared transactions. | ||
129 | work_mem = 512MB # min 64kB | ||
130 | maintenance_work_mem = 1024MB # min 1MB | ||
131 | #replacement_sort_tuples = 150000 # limits use of replacement selection sort | ||
132 | #autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem | ||
133 | #max_stack_depth = 2MB # min 100kB | ||
134 | dynamic_shared_memory_type = posix # the default is the first option | ||
135 | # supported by the operating system: | ||
136 | # posix | ||
137 | # sysv | ||
138 | # windows | ||
139 | # mmap | ||
140 | # use none to disable dynamic shared memory | ||
141 | # (change requires restart) | ||
142 | |||
143 | # - Disk - | ||
144 | |||
145 | #temp_file_limit = -1 # limits per-process temp file space | ||
146 | # in kB, or -1 for no limit | ||
147 | |||
148 | # - Kernel Resource Usage - | ||
149 | |||
150 | #max_files_per_process = 1000 # min 25 | ||
151 | # (change requires restart) | ||
152 | #shared_preload_libraries = '' # (change requires restart) | ||
153 | |||
154 | # - Cost-Based Vacuum Delay - | ||
155 | |||
156 | #vacuum_cost_delay = 0 # 0-100 milliseconds | ||
157 | #vacuum_cost_page_hit = 1 # 0-10000 credits | ||
158 | #vacuum_cost_page_miss = 10 # 0-10000 credits | ||
159 | #vacuum_cost_page_dirty = 20 # 0-10000 credits | ||
160 | #vacuum_cost_limit = 200 # 1-10000 credits | ||
161 | |||
162 | # - Background Writer - | ||
163 | |||
164 | bgwriter_delay = 2000ms # 10-10000ms between rounds | ||
165 | #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round | ||
166 | #bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round | ||
167 | #bgwriter_flush_after = 512kB # measured in pages, 0 disables | ||
168 | |||
169 | # - Asynchronous Behavior - | ||
170 | |||
171 | #effective_io_concurrency = 1 # 1-1000; 0 disables prefetching | ||
172 | #max_worker_processes = 8 # (change requires restart) | ||
173 | #max_parallel_workers_per_gather = 2 # taken from max_parallel_workers | ||
174 | #max_parallel_workers = 8 # maximum number of max_worker_processes that | ||
175 | # can be used in parallel queries | ||
176 | #old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate | ||
177 | # (change requires restart) | ||
178 | #backend_flush_after = 0 # measured in pages, 0 disables | ||
179 | |||
180 | |||
181 | #------------------------------------------------------------------------------ | ||
182 | # WRITE AHEAD LOG | ||
183 | #------------------------------------------------------------------------------ | ||
184 | |||
185 | # - Settings - | ||
186 | |||
187 | wal_level = logical # minimal, replica, or logical | ||
188 | # (change requires restart) | ||
189 | {% if postgres_fsync_enabled %} | ||
190 | #fsync = on # flush data to disk for crash safety | ||
191 | # (turning this off can cause | ||
192 | # unrecoverable data corruption) | ||
193 | #synchronous_commit = on # synchronization level; | ||
194 | # off, local, remote_write, remote_apply, or on | ||
195 | {% else %} | ||
196 | fsync = off # turns forced synchronization on or off | ||
197 | synchronous_commit = off # synchronization level; | ||
198 | {% endif %} | ||
199 | #wal_sync_method = fsync # the default is the first option | ||
200 | # supported by the operating system: | ||
201 | # open_datasync | ||
202 | # fdatasync (default on Linux) | ||
203 | # fsync | ||
204 | # fsync_writethrough | ||
205 | # open_sync | ||
206 | #full_page_writes = on # recover from partial page writes | ||
207 | #wal_compression = off # enable compression of full-page writes | ||
208 | wal_log_hints = on # also do full page writes of non-critical updates | ||
209 | # (change requires restart) | ||
210 | #wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers | ||
211 | # (change requires restart) | ||
212 | #wal_writer_delay = 200ms # 1-10000 milliseconds | ||
213 | #wal_writer_flush_after = 1MB # measured in pages, 0 disables | ||
214 | |||
215 | #commit_delay = 0 # range 0-100000, in microseconds | ||
216 | #commit_siblings = 5 # range 1-1000 | ||
217 | |||
218 | # - Checkpoints - | ||
219 | |||
220 | #checkpoint_timeout = 5min # range 30s-1d | ||
221 | #max_wal_size = 1GB | ||
222 | #min_wal_size = 80MB | ||
223 | #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 | ||
224 | #checkpoint_flush_after = 256kB # measured in pages, 0 disables | ||
225 | #checkpoint_warning = 30s # 0 disables | ||
226 | |||
227 | # - Archiving - | ||
228 | |||
229 | {% if postgres_archive_enabled %} | ||
230 | archive_mode = on | ||
231 | archive_command = 'rsync -a %p barman@{{ postgres_barman_server }}:/var/lib/barman/{{ barman_directory }}/incoming/%f' | ||
232 | {% else %} | ||
233 | archive_mode = off | ||
234 | archive_command = '' | ||
235 | {% endif %} | ||
236 | |||
237 | #archive_mode = off # enables archiving; off, on, or always | ||
238 | # (change requires restart) | ||
239 | #archive_command = '' # command to use to archive a logfile segment | ||
240 | # placeholders: %p = path of file to archive | ||
241 | # %f = file name only | ||
242 | # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' | ||
243 | #archive_timeout = 0 # force a logfile segment switch after this | ||
244 | # number of seconds; 0 disables | ||
245 | |||
246 | |||
247 | #------------------------------------------------------------------------------ | ||
248 | # REPLICATION | ||
249 | #------------------------------------------------------------------------------ | ||
250 | |||
251 | # - Sending Server(s) - | ||
252 | |||
253 | # Set these on the master and on any standby that will send replication data. | ||
254 | |||
255 | max_wal_senders = 10 # max number of walsender processes | ||
256 | # (change requires restart) | ||
257 | wal_keep_segments = 16 # in logfile segments, 16MB each; 0 disables | ||
258 | #wal_sender_timeout = 60s # in milliseconds; 0 disables | ||
259 | |||
260 | {% if postgres_max_replication_slots is defined %} | ||
261 | max_replication_slots = {{ postgres_max_replication_slots }} # max number of replication slots | ||
262 | {% else %} | ||
263 | #max_replication_slots = 0 # max number of replication slots | ||
264 | {% endif %} | ||
265 | # (change requires restart) | ||
266 | #track_commit_timestamp = off # collect timestamp of transaction commit | ||
267 | # (change requires restart) | ||
268 | |||
269 | # - Master Server - | ||
270 | |||
271 | # These settings are ignored on a standby server. | ||
272 | |||
273 | #synchronous_standby_names = '' # standby servers that provide sync rep | ||
274 | # method to choose sync standbys, number of sync standbys, | ||
275 | # and comma-separated list of application_name | ||
276 | # from standby(s); '*' = all | ||
277 | #vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed | ||
278 | |||
279 | # - Standby Servers - | ||
280 | |||
281 | # These settings are ignored on a master server. | ||
282 | |||
283 | hot_standby = on # "off" disallows queries during recovery | ||
284 | # (change requires restart) | ||
285 | #max_standby_archive_delay = 30s # max delay before canceling queries | ||
286 | # when reading WAL from archive; | ||
287 | # -1 allows indefinite delay | ||
288 | max_standby_streaming_delay = {{ postgres_extra_config.max_standby_streaming_delay | default('600s') }} # max delay before canceling queries | ||
289 | # when reading streaming WAL; | ||
290 | # -1 allows indefinite delay | ||
291 | #wal_receiver_status_interval = 10s # send replies at least this often | ||
292 | # 0 disables | ||
293 | #hot_standby_feedback = off # send info from standby to prevent | ||
294 | # query conflicts | ||
295 | #wal_receiver_timeout = 60s # time that receiver waits for | ||
296 | # communication from master | ||
297 | # in milliseconds; 0 disables | ||
298 | #wal_retrieve_retry_interval = 5s # time to wait before retrying to | ||
299 | # retrieve WAL after a failed attempt | ||
300 | |||
301 | # - Subscribers - | ||
302 | |||
303 | # These settings are ignored on a publisher. | ||
304 | |||
305 | #max_logical_replication_workers = 4 # taken from max_worker_processes | ||
306 | # (change requires restart) | ||
307 | #max_sync_workers_per_subscription = 2 # taken from max_logical_replication_workers | ||
308 | |||
309 | |||
310 | #------------------------------------------------------------------------------ | ||
311 | # QUERY TUNING | ||
312 | #------------------------------------------------------------------------------ | ||
313 | |||
314 | # - Planner Method Configuration - | ||
315 | |||
316 | #enable_bitmapscan = on | ||
317 | #enable_hashagg = on | ||
318 | #enable_hashjoin = on | ||
319 | #enable_indexscan = on | ||
320 | #enable_indexonlyscan = on | ||
321 | #enable_material = on | ||
322 | #enable_mergejoin = on | ||
323 | #enable_nestloop = on | ||
324 | #enable_seqscan = on | ||
325 | #enable_sort = on | ||
326 | #enable_tidscan = on | ||
327 | |||
328 | # - Planner Cost Constants - | ||
329 | |||
330 | #seq_page_cost = 1.0 # measured on an arbitrary scale | ||
331 | {% if postgres_specific_random_page_cost is defined -%} | ||
332 | # Random page cost is an arbitrary value relative to the seq_page_cost conf (default 1.0) | ||
333 | # On SSD disk it is better to lower the default value from 4.0 to 1.0 for instance. | ||
334 | random_page_cost = {{ postgres_specific_random_page_cost }} # same scale as above | ||
335 | {% else -%} | ||
336 | #random_page_cost = 4.0 # same scale as above | ||
337 | {% endif %} | ||
338 | #cpu_tuple_cost = 0.01 # same scale as above | ||
339 | #cpu_index_tuple_cost = 0.005 # same scale as above | ||
340 | #cpu_operator_cost = 0.0025 # same scale as above | ||
341 | #parallel_tuple_cost = 0.1 # same scale as above | ||
342 | #parallel_setup_cost = 1000.0 # same scale as above | ||
343 | #min_parallel_table_scan_size = 8MB | ||
344 | #min_parallel_index_scan_size = 512kB | ||
345 | #effective_cache_size = 4GB | ||
346 | effective_cache_size = {{ ansible_memtotal_mb // 2 }}MB | ||
347 | |||
348 | # - Genetic Query Optimizer - | ||
349 | |||
350 | #geqo = on | ||
351 | #geqo_threshold = 12 | ||
352 | #geqo_effort = 5 # range 1-10 | ||
353 | #geqo_pool_size = 0 # selects default based on effort | ||
354 | #geqo_generations = 0 # selects default based on effort | ||
355 | #geqo_selection_bias = 2.0 # range 1.5-2.0 | ||
356 | #geqo_seed = 0.0 # range 0.0-1.0 | ||
357 | |||
358 | # - Other Planner Options - | ||
359 | |||
360 | #default_statistics_target = 100 # range 1-10000 | ||
361 | #constraint_exclusion = partition # on, off, or partition | ||
362 | #cursor_tuple_fraction = 0.1 # range 0.0-1.0 | ||
363 | #from_collapse_limit = 8 | ||
364 | #join_collapse_limit = 8 # 1 disables collapsing of explicit | ||
365 | # JOIN clauses | ||
366 | #force_parallel_mode = off | ||
367 | |||
368 | |||
369 | #------------------------------------------------------------------------------ | ||
370 | # ERROR REPORTING AND LOGGING | ||
371 | #------------------------------------------------------------------------------ | ||
372 | |||
373 | # - Where to Log - | ||
374 | |||
375 | #log_destination = 'stderr' # Valid values are combinations of | ||
376 | # stderr, csvlog, syslog, and eventlog, | ||
377 | # depending on platform. csvlog | ||
378 | # requires logging_collector to be on. | ||
379 | |||
380 | # This is used when logging to stderr: | ||
381 | #logging_collector = off # Enable capturing of stderr and csvlog | ||
382 | # into log files. Required to be on for | ||
383 | # csvlogs. | ||
384 | # (change requires restart) | ||
385 | |||
386 | # These are only used if logging_collector is on: | ||
387 | #log_directory = 'log' # directory where log files are written, | ||
388 | # can be absolute or relative to PGDATA | ||
389 | #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, | ||
390 | # can include strftime() escapes | ||
391 | #log_file_mode = 0600 # creation mode for log files, | ||
392 | # begin with 0 to use octal notation | ||
393 | #log_truncate_on_rotation = off # If on, an existing log file with the | ||
394 | # same name as the new log file will be | ||
395 | # truncated rather than appended to. | ||
396 | # But such truncation only occurs on | ||
397 | # time-driven rotation, not on restarts | ||
398 | # or size-driven rotation. Default is | ||
399 | # off, meaning append to existing files | ||
400 | # in all cases. | ||
401 | #log_rotation_age = 1d # Automatic rotation of logfiles will | ||
402 | # happen after that time. 0 disables. | ||
403 | #log_rotation_size = 10MB # Automatic rotation of logfiles will | ||
404 | # happen after that much log output. | ||
405 | # 0 disables. | ||
406 | |||
407 | # These are relevant when logging to syslog: | ||
408 | #syslog_facility = 'LOCAL0' | ||
409 | #syslog_ident = 'postgres' | ||
410 | #syslog_sequence_numbers = on | ||
411 | #syslog_split_messages = on | ||
412 | |||
413 | # This is only relevant when logging to eventlog (win32): | ||
414 | # (change requires restart) | ||
415 | #event_source = 'PostgreSQL' | ||
416 | |||
417 | # - When to Log - | ||
418 | |||
419 | #client_min_messages = notice # values in order of decreasing detail: | ||
420 | # debug5 | ||
421 | # debug4 | ||
422 | # debug3 | ||
423 | # debug2 | ||
424 | # debug1 | ||
425 | # log | ||
426 | # notice | ||
427 | # warning | ||
428 | # error | ||
429 | |||
430 | #log_min_messages = warning # values in order of decreasing detail: | ||
431 | # debug5 | ||
432 | # debug4 | ||
433 | # debug3 | ||
434 | # debug2 | ||
435 | # debug1 | ||
436 | # info | ||
437 | # notice | ||
438 | # warning | ||
439 | # error | ||
440 | # log | ||
441 | # fatal | ||
442 | # panic | ||
443 | |||
444 | #log_min_error_statement = error # values in order of decreasing detail: | ||
445 | # debug5 | ||
446 | # debug4 | ||
447 | # debug3 | ||
448 | # debug2 | ||
449 | # debug1 | ||
450 | # info | ||
451 | # notice | ||
452 | # warning | ||
453 | # error | ||
454 | # log | ||
455 | # fatal | ||
456 | # panic (effectively off) | ||
457 | |||
458 | log_min_duration_statement = 10000 # -1 is disabled, 0 logs all statements | ||
459 | # and their durations, > 0 logs only | ||
460 | # statements running at least this number | ||
461 | # of milliseconds | ||
462 | |||
463 | |||
464 | # - What to Log - | ||
465 | |||
466 | #debug_print_parse = off | ||
467 | #debug_print_rewritten = off | ||
468 | #debug_print_plan = off | ||
469 | #debug_pretty_print = on | ||
470 | #log_checkpoints = off | ||
471 | #log_connections = off | ||
472 | #log_disconnections = off | ||
473 | #log_duration = off | ||
474 | #log_error_verbosity = default # terse, default, or verbose messages | ||
475 | #log_hostname = off | ||
476 | |||
477 | log_line_prefix = '{{ postgres_log_line_prefix }}' | ||
478 | #log_line_prefix = '%m [%p] %q%u@%d ' # special values: | ||
479 | # %a = application name | ||
480 | # %u = user name | ||
481 | # %d = database name | ||
482 | # %r = remote host and port | ||
483 | # %h = remote host | ||
484 | # %p = process ID | ||
485 | # %t = timestamp without milliseconds | ||
486 | # %m = timestamp with milliseconds | ||
487 | # %n = timestamp with milliseconds (as a Unix epoch) | ||
488 | # %i = command tag | ||
489 | # %e = SQL state | ||
490 | # %c = session ID | ||
491 | # %l = session line number | ||
492 | # %s = session start timestamp | ||
493 | # %v = virtual transaction ID | ||
494 | # %x = transaction ID (0 if none) | ||
495 | # %q = stop here in non-session | ||
496 | # processes | ||
497 | # %% = '%' | ||
498 | # e.g. '<%u%%%d> ' | ||
499 | #log_lock_waits = off # log lock waits >= deadlock_timeout | ||
500 | #log_statement = 'none' # none, ddl, mod, all | ||
501 | #log_replication_commands = off | ||
502 | #log_temp_files = -1 # log temporary files equal or larger | ||
503 | # than the specified size in kilobytes; | ||
504 | # -1 disables, 0 logs all temp files | ||
505 | log_timezone = 'UTC' | ||
506 | |||
507 | |||
508 | # - Process Title - | ||
509 | |||
510 | cluster_name = '{{ postgres_version }}/{{ postgres_cluster_name }}' # added to process titles if nonempty | ||
511 | # (change requires restart) | ||
512 | #update_process_title = on | ||
513 | |||
514 | |||
515 | #------------------------------------------------------------------------------ | ||
516 | # RUNTIME STATISTICS | ||
517 | #------------------------------------------------------------------------------ | ||
518 | |||
519 | # - Query/Index Statistics Collector - | ||
520 | |||
521 | #track_activities = on | ||
522 | #track_counts = on | ||
523 | #track_io_timing = off | ||
524 | #track_functions = none # none, pl, all | ||
525 | #track_activity_query_size = 1024 # (change requires restart) | ||
526 | stats_temp_directory = '/var/run/postgresql/{{ postgres_version }}-{{ postgres_cluster_name }}.pg_stat_tmp' | ||
527 | |||
528 | |||
529 | # - Statistics Monitoring - | ||
530 | |||
531 | #log_parser_stats = off | ||
532 | #log_planner_stats = off | ||
533 | #log_executor_stats = off | ||
534 | #log_statement_stats = off | ||
535 | |||
536 | |||
537 | #------------------------------------------------------------------------------ | ||
538 | # AUTOVACUUM PARAMETERS | ||
539 | #------------------------------------------------------------------------------ | ||
540 | |||
541 | #autovacuum = on # Enable autovacuum subprocess? 'on' | ||
542 | # requires track_counts to also be on. | ||
543 | #log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and | ||
544 | # their durations, > 0 logs only | ||
545 | # actions running at least this number | ||
546 | # of milliseconds. | ||
547 | #autovacuum_max_workers = 3 # max number of autovacuum subprocesses | ||
548 | # (change requires restart) | ||
549 | #autovacuum_naptime = 1min # time between autovacuum runs | ||
550 | #autovacuum_vacuum_threshold = 50 # min number of row updates before | ||
551 | # vacuum | ||
552 | #autovacuum_analyze_threshold = 50 # min number of row updates before | ||
553 | # analyze | ||
554 | #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum | ||
555 | #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze | ||
556 | #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum | ||
557 | # (change requires restart) | ||
558 | #autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age | ||
559 | # before forced vacuum | ||
560 | # (change requires restart) | ||
561 | #autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for | ||
562 | # autovacuum, in milliseconds; | ||
563 | # -1 means use vacuum_cost_delay | ||
564 | #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for | ||
565 | # autovacuum, -1 means use | ||
566 | # vacuum_cost_limit | ||
567 | |||
568 | |||
569 | #------------------------------------------------------------------------------ | ||
570 | # CLIENT CONNECTION DEFAULTS | ||
571 | #------------------------------------------------------------------------------ | ||
572 | |||
573 | # - Statement Behavior - | ||
574 | |||
575 | #search_path = '"$user", public' # schema names | ||
576 | #default_tablespace = '' # a tablespace name, '' uses the default | ||
577 | #temp_tablespaces = '' # a list of tablespace names, '' uses | ||
578 | # only default tablespace | ||
579 | #check_function_bodies = on | ||
580 | #default_transaction_isolation = 'read committed' | ||
581 | #default_transaction_read_only = off | ||
582 | #default_transaction_deferrable = off | ||
583 | #session_replication_role = 'origin' | ||
584 | #statement_timeout = 0 # in milliseconds, 0 is disabled | ||
585 | #lock_timeout = 0 # in milliseconds, 0 is disabled | ||
586 | #idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled | ||
587 | #vacuum_freeze_min_age = 50000000 | ||
588 | #vacuum_freeze_table_age = 150000000 | ||
589 | #vacuum_multixact_freeze_min_age = 5000000 | ||
590 | #vacuum_multixact_freeze_table_age = 150000000 | ||
591 | #bytea_output = 'hex' # hex, escape | ||
592 | #xmlbinary = 'base64' | ||
593 | #xmloption = 'content' | ||
594 | #gin_fuzzy_search_limit = 0 | ||
595 | #gin_pending_list_limit = 4MB | ||
596 | |||
597 | # - Locale and Formatting - | ||
598 | |||
599 | datestyle = '{{ postgres_datestyle }}' | ||
600 | #intervalstyle = 'postgres' | ||
601 | #timezone = '(defaults to server environment setting)' | ||
602 | {% if postgres_timezone is defined %} | ||
603 | timezone = '{{ postgres_timezone }}' | ||
604 | {% endif %} | ||
605 | #timezone_abbreviations = 'Default' # Select the set of available time zone | ||
606 | # abbreviations. Currently, there are | ||
607 | # Default | ||
608 | # Australia (historical usage) | ||
609 | # India | ||
610 | # You can create your own file in | ||
611 | # share/timezonesets/. | ||
612 | #extra_float_digits = 0 # min -15, max 3 | ||
613 | #client_encoding = sql_ascii # actually, defaults to database | ||
614 | # encoding | ||
615 | |||
616 | # These settings are initialized by initdb, but they can be changed. | ||
617 | lc_messages = '{{ postgres_locale_system }}' # locale for system error message | ||
618 | # strings | ||
619 | lc_monetary = '{{ postgres_locale_formats }}' # locale for monetary formatting | ||
620 | lc_numeric = '{{ postgres_locale_formats }}' # locale for number formatting | ||
621 | lc_time = '{{ postgres_locale_formats }}' # locale for time formatting | ||
622 | |||
623 | # default configuration for text search | ||
624 | default_text_search_config = '{{ postgres_text_search_config }}' | ||
625 | |||
626 | # - Other Defaults - | ||
627 | |||
628 | #dynamic_library_path = '$libdir' | ||
629 | #local_preload_libraries = '' | ||
630 | #session_preload_libraries = '' | ||
631 | |||
632 | |||
633 | #------------------------------------------------------------------------------ | ||
634 | # LOCK MANAGEMENT | ||
635 | #------------------------------------------------------------------------------ | ||
636 | |||
637 | #deadlock_timeout = 1s | ||
638 | #max_locks_per_transaction = 64 # min 10 | ||
639 | # (change requires restart) | ||
640 | #max_pred_locks_per_transaction = 64 # min 10 | ||
641 | # (change requires restart) | ||
642 | #max_pred_locks_per_relation = -2 # negative values mean | ||
643 | # (max_pred_locks_per_transaction | ||
644 | # / -max_pred_locks_per_relation) - 1 | ||
645 | #max_pred_locks_per_page = 2 # min 0 | ||
646 | |||
647 | |||
648 | #------------------------------------------------------------------------------ | ||
649 | # VERSION/PLATFORM COMPATIBILITY | ||
650 | #------------------------------------------------------------------------------ | ||
651 | |||
652 | # - Previous PostgreSQL Versions - | ||
653 | |||
654 | #array_nulls = on | ||
655 | #backslash_quote = safe_encoding # on, off, or safe_encoding | ||
656 | #default_with_oids = off | ||
657 | #escape_string_warning = on | ||
658 | #lo_compat_privileges = off | ||
659 | #operator_precedence_warning = off | ||
660 | #quote_all_identifiers = off | ||
661 | #standard_conforming_strings = on | ||
662 | #synchronize_seqscans = on | ||
663 | |||
664 | # - Other Platforms and Clients - | ||
665 | |||
666 | #transform_null_equals = off | ||
667 | |||
668 | |||
669 | #------------------------------------------------------------------------------ | ||
670 | # ERROR HANDLING | ||
671 | #------------------------------------------------------------------------------ | ||
672 | |||
673 | #exit_on_error = off # terminate session on any error? | ||
674 | #restart_after_crash = on # reinitialize after backend crash? | ||
675 | |||
676 | |||
677 | #------------------------------------------------------------------------------ | ||
678 | # CONFIG FILE INCLUDES | ||
679 | #------------------------------------------------------------------------------ | ||
680 | |||
681 | # These options allow settings to be loaded from files other than the | ||
682 | # default postgresql.conf. | ||
683 | |||
684 | #include_dir = 'conf.d' # include files ending in '.conf' from | ||
685 | # directory 'conf.d' | ||
686 | #include_if_exists = 'exists.conf' # include file only if it exists | ||
687 | #include = 'special.conf' # include file | ||
688 | |||
689 | |||
690 | #------------------------------------------------------------------------------ | ||
691 | # CUSTOMIZED OPTIONS | ||
692 | #------------------------------------------------------------------------------ | ||
693 | |||
694 | # Add settings for extensions here | ||