29 lines
1.3 KiB
Django/Jinja
29 lines
1.3 KiB
Django/Jinja
|
|
# Managed by XINFRA PostgreSQL delivery. instance={{ postgresql_instance_id }}
|
||
|
|
listen_addresses = '*'
|
||
|
|
port = {{ postgresql_port_value }}
|
||
|
|
data_directory = '{{ postgresql_data_dir }}'
|
||
|
|
hba_file = '{{ postgresql_hba_file }}'
|
||
|
|
unix_socket_directories = '{{ postgresql_run_dir }}'
|
||
|
|
external_pid_file = '{{ postgresql_run_dir }}/postmaster.pid'
|
||
|
|
logging_collector = on
|
||
|
|
log_directory = '{{ postgresql_log_dir }}'
|
||
|
|
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
|
||
|
|
log_min_messages = warning
|
||
|
|
max_connections = {{ postgresql_max_connections }}
|
||
|
|
shared_buffers = '{{ postgresql_shared_buffers }}'
|
||
|
|
effective_cache_size = '{{ postgresql_effective_cache_size }}'
|
||
|
|
work_mem = '4MB'
|
||
|
|
maintenance_work_mem = '64MB'
|
||
|
|
wal_level = replica
|
||
|
|
max_wal_senders = {{ postgresql_max_wal_senders }}
|
||
|
|
max_replication_slots = {{ postgresql_max_replication_slots }}
|
||
|
|
wal_keep_size = '256MB'
|
||
|
|
hot_standby = on
|
||
|
|
synchronous_standby_names = ''
|
||
|
|
{% if postgresql_role == 'primary' %}
|
||
|
|
primary_conninfo = ''
|
||
|
|
{% elif postgresql_role == 'replica' %}
|
||
|
|
primary_conninfo = 'host={{ postgresql_primary_host }} port={{ postgresql_primary_port }} user={{ postgresql_replication_user }} password={{ postgresql_replication_password | replace("'", "''") }} application_name={{ postgresql_instance_id }}'
|
||
|
|
primary_slot_name = '{{ postgresql_replication_slot }}'
|
||
|
|
{% endif %}
|