ansible-roles/postgresql/templates/postgresql.conf.j2

37 lines
1 KiB
Plaintext
Raw Normal View History

2016-12-22 16:12:34 +01:00
# Tuning
2017-05-19 23:58:24 +02:00
shared_buffers = {{ postgresql_shared_buffers }}
work_mem = {{ postgresql_work_mem }}
listen_addresses = '{{ postgresql_listen_addresses | join(',') }}'
2016-12-22 16:12:34 +01:00
#shared_preload_libraries = 'pg_stat_statements'
#synchronous_commit = off
{% if postgresql_version is version('9.5', '<') %}
2017-05-19 23:58:24 +02:00
checkpoint_segments = 30
2017-03-28 16:46:47 +02:00
{% else %}
max_wal_size = 15GB
{% endif %}
2023-03-09 14:37:42 +01:00
{% if postgresql_max_connections and postgresql_max_connections | int > 0 %}
max_connections = {{ postgresql_max_connections }}
{% endif %}
2017-03-28 16:46:47 +02:00
2016-12-22 16:12:34 +01:00
checkpoint_completion_target = 0.9
2017-05-19 23:58:24 +02:00
random_page_cost = {{ postgresql_random_page_cost }}
effective_cache_size = {{ postgresql_effective_cache_size }}
2016-12-22 16:12:34 +01:00
# Logging
2016-12-22 16:12:34 +01:00
log_min_duration_statement = 1s
log_checkpoints = on
2017-05-19 23:58:24 +02:00
log_lock_waits = on
2016-12-22 16:12:34 +01:00
log_temp_files = 5MB
log_autovacuum_min_duration = 1s
2022-12-15 14:47:04 +01:00
log_line_prefix = '%t [%p]: user=%u,db=%d,app=%a,client=%h '
lc_messages = 'C'
2016-12-22 16:12:34 +01:00
# Locales
lc_monetary = 'fr_FR.UTF-8'
lc_numeric = 'fr_FR.UTF-8'
lc_time = 'fr_FR.UTF-8'
default_text_search_config = 'pg_catalog.french'
#escape_string_warning = off
#standard_conforming_strings = off