Загрузить файлы в «/»

This commit is contained in:
2026-07-02 20:50:29 +03:00
parent 058d9d549b
commit 367c117f68
3 changed files with 51 additions and 0 deletions

33
postgresql.conf.template Normal file
View File

@@ -0,0 +1,33 @@
data_directory = '/var/lib/postgresql/14/main'
hba_file = '/etc/postgresql/14/main/pg_hba.conf'
ident_file = '/etc/postgresql/14/main/pg_ident.conf'
listen_addresses = '*'
port = 5432
max_connections = 100
wal_level = replica
wal_log_hints = on
max_wal_senders = 10
max_replication_slots = 10
hot_standby = on
hot_standby_feedback = on
{% if inventory_hostname == 'sql-master' %}
primary_slot_name = 'standby_slot'
{% else %}
primary_conninfo = 'host={{ master_ip }} port=5432 user={{ replication_user }} password={{ replication_password }} application_name=standby1'
primary_slot_name = 'standby_slot'
{% endif %}
{% if inventory_hostname == 'sql-master' %}
archive_mode = on
archive_command = '/bin/true'
{% endif %}
wal_keep_size = 1024
max_slot_wal_keep_size = 1024