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