mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
In case if one member of a cluster is not available it will retry with another one and fetch the new cluster configuration. Default timeout for all requests to etcd is 5 seconds. Initial cluster configuration can be resolved through: 1) /v2/members call on one of the cluster members on a client port 2) when it is possible to resolve hostname into multiple ip's it will iterate through list and try to perform action from 1) 3) If there is discovery_srv defined in etcd section of config file it will resolve peer addresses of all cluster members and will fetch cluster configuration with using peer protocol by doing /members call on a peer port
34 lines
838 B
YAML
34 lines
838 B
YAML
loop_wait: 10
|
|
restapi:
|
|
listen: 127.0.0.1:8008
|
|
connect_address: 127.0.0.1:8008
|
|
etcd:
|
|
scope: batman
|
|
ttl: 30
|
|
host: 127.0.0.1:4001
|
|
#discovery_srv: my-etcd.domain
|
|
postgresql:
|
|
name: postgresql0
|
|
listen: 127.0.0.1:5432
|
|
connect_address: 127.0.0.1:5432
|
|
data_dir: data/postgresql0
|
|
maximum_lag_on_failover: 1048576 # 1 megabyte in bytes
|
|
pg_hba:
|
|
- host all all 0.0.0.0/0 md5
|
|
- hostssl all all 0.0.0.0/0 md5
|
|
replication:
|
|
username: replicator
|
|
password: rep-pass
|
|
network: 127.0.0.1/32
|
|
#recovery_conf:
|
|
#restore_command: cp ../wal_archive/%f %p
|
|
parameters:
|
|
archive_mode: "on"
|
|
wal_level: hot_standby
|
|
archive_command: mkdir -p ../wal_archive && cp %p ../wal_archive/%f
|
|
max_wal_senders: 5
|
|
wal_keep_segments: 8
|
|
archive_timeout: 1800s
|
|
max_replication_slots: 5
|
|
hot_standby: "on"
|