patroni: scope: patroni_cluster namespace: /patroni name: {{ etcd_node }} log: level: INFO dir: /data/log/patroni file_size: 50000000 file_num: 10 restapi: listen: 0.0.0.0:8008 connect_address: {{ etcd_node }}:8008 # Изменить на 2 ноде verify_client: none etcd3: hosts: ["etcd1:2379", "etcd2:2379", "etcd3:2379"] protocol: http watchdog: mode: off # Если настроен, можно включить bootstrap: dcs: failsafe_mode: true ttl: 30 loop_wait: 10 retry_timeout: 10 maximum_lag_on_failover: 1048576 synchronous_mode: true synchronous_mode_strict: true synchronous_mode_count: 1 master_start_timeout: 30 slots: prod_replica1: type: physical postgresql: use_pg_rewind: true use_slots: true parameters: shared_buffers: '512MB' wal_level: 'replica' wal_keep_size: '512MB' max_connections: 100 effective_cache_size: '1GB' maintenance_work_mem: '256MB' max_wal_senders: 5 max_replication_slots: 5 checkpoint_completion_target: 0.7 log_connections: 'on' log_disconnections: 'on' log_statement: 'ddl' log_line_prefix: '%m [%p] %q%u@%d ' logging_collector: 'on' log_destination: 'stderr' log_directory: '/data/log' log_filename: 'postgresql-%Y-%m-%d.log' log_rotation_size: '100MB' log_rotation_age: '1d' log_min_duration_statement: -1 log_min_error_statement: 'error' log_min_messages: 'warning' log_error_verbosity: 'verbose' log_hostname: 'off' log_duration: 'off' log_timezone: 'Europe/Moscow' timezone: 'Europe/Moscow' lc_messages: 'C.UTF-8' password_encryption: 'scram-sha-256' debug_print_parse: 'off' debug_print_rewritten: 'off' debug_print_plan: 'off' superuser_reserved_connections: 3 synchronous_commit: 'on' synchronous_standby_names: '*' hot_standby: 'on' compute_query_id: 'on' pg_hba: - local all all peer - host all all 127.0.0.1/32 scram-sha-256 - host all all 0.0.0.0/0 md5 - host replication replicator 127.0.0.1/32 scram-sha-256 - host replication replicator 192.168.60.0/24 scram-sha-256 pg_hba: - local all all peer - host all all 127.0.0.1/32 scram-sha-256 - host all all 0.0.0.0/0 md5 - host replication replicator 127.0.0.1/32 scram-sha-256 - host replication replicator 192.168.60.0/24 scram-sha-256 initdb: ["encoding=UTF8", "data-checksums", "username=postgres", "auth=scram-sha-256"] users: admin: password: 'new_secure_password1' options: ["createdb"] postgresql: listen: 0.0.0.0 connect_address: {{ node_local_ip }}:5432 use