xoxys.postgres/templates/postgresql/data/postgresql.conf.j2

87 lines
2.4 KiB
Plaintext
Raw Normal View History

2019-08-27 22:56:02 +02:00
{{ ansible_managed | comment }}
2018-10-16 20:53:36 +02:00
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
# - Connection Settings -
2018-10-16 21:41:55 +02:00
listen_addresses = '{{ postgres_connection_addresses | join(",") }}'
2018-10-16 20:53:36 +02:00
port = {{ postgres_connection_port }}
max_connections = 100
2018-10-16 21:45:53 +02:00
unix_socket_directories = '{{ postgres_socket_directories | join(",") }}'
2018-10-16 20:53:36 +02:00
2022-04-04 21:51:15 +02:00
# - Authentication -
2018-10-16 20:53:36 +02:00
2022-04-04 21:51:15 +02:00
authentication_timeout = 1min
password_encryption = {{ postgres_password_encryption }}
# - SSL -
2018-10-16 23:05:15 +02:00
{% if postgres_tls_enabled %}
2022-04-04 21:51:15 +02:00
ssl = on
2018-10-16 23:11:31 +02:00
ssl_cert_file = '{{ __postgres_tls_cert_path }}'
ssl_key_file = '{{ __postgres_tls_key_path }}'
2022-04-04 21:51:15 +02:00
{% else %}
ssl = off
2018-10-16 23:05:15 +02:00
{% endif %}
2018-10-16 20:53:36 +02:00
#------------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#------------------------------------------------------------------------------
2022-04-04 21:51:15 +02:00
# - Memory -
2018-10-16 20:53:36 +02:00
2022-04-04 21:51:15 +02:00
shared_buffers = 128MB
dynamic_shared_memory_type = posix
2018-10-16 20:53:36 +02:00
# - Checkpoints -
2022-04-04 21:51:15 +02:00
max_wal_size = 1GB
min_wal_size = 80MB
2018-10-16 20:53:36 +02:00
#------------------------------------------------------------------------------
2022-04-04 21:51:15 +02:00
# REPORTING AND LOGGING
2018-10-16 20:53:36 +02:00
#------------------------------------------------------------------------------
# - Where to Log -
2018-10-16 21:51:52 +02:00
log_destination = '{{ postgres_log_destination | join(",") }}'
2018-10-16 20:53:36 +02:00
{% if "stderr" in postgres_log_destination or "csvlog" in postgres_log_destination %}
logging_collector = on
{% else %}
logging_collector = off
{% endif %}
log_directory = '{{ postgres_log_directory }}'
log_filename = '{{ postgres_log_filename }}'
log_rotation_age = {{ postgres_log_rotation_age }}
log_rotation_size = {{ postgres_log_rotation_size }}
2022-04-04 21:51:15 +02:00
log_truncate_on_rotation = on
2018-10-16 20:53:36 +02:00
# - What to Log -
2022-04-04 21:51:15 +02:00
log_line_prefix = '%m [%p] '
log_timezone = 'Etc/UTC'
2018-10-16 20:53:36 +02:00
#------------------------------------------------------------------------------
# CLIENT CONNECTION DEFAULTS
#------------------------------------------------------------------------------
# - Locale and Formatting -
datestyle = 'iso, mdy'
2022-04-04 21:51:15 +02:00
timezone = 'Etc/UTC'
2018-10-16 20:53:36 +02:00
lc_messages = 'en_US.UTF-8'
2022-04-04 21:51:15 +02:00
lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
lc_numeric = 'en_US.UTF-8' # locale for number formatting
lc_time = 'en_US.UTF-8' # locale for time formatting
2018-10-16 20:53:36 +02:00
default_text_search_config = 'pg_catalog.english'