mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-01-27 18:20:05 +00:00
The v1.0 has been released more than one month ago and the new version is coming. It doesn't make a lot of sense to keep configuration files in the old format anymore. In addition to that I've also commented out all the lines enabling and configuring "archiving" to avoid incidents like here: https://github.com/zalando/patroni/issues/264
79 lines
2.0 KiB
YAML
79 lines
2.0 KiB
YAML
scope: batman
|
|
#namespace: /service/
|
|
name: postgresql2
|
|
|
|
restapi:
|
|
listen: 127.0.0.1:8010
|
|
connect_address: 127.0.0.1:8010
|
|
# certfile: /etc/ssl/certs/ssl-cert-snakeoil.pem
|
|
# keyfile: /etc/ssl/private/ssl-cert-snakeoil.key
|
|
authentication:
|
|
username: username
|
|
password: password
|
|
|
|
etcd:
|
|
host: 127.0.0.1:4001
|
|
|
|
bootstrap:
|
|
# this section will be written into Etcd:/<namespace>/<scope>/config after initializing new cluster
|
|
# and all other cluster members will use it as a `global configuration`
|
|
dcs:
|
|
ttl: 30
|
|
loop_wait: 10
|
|
retry_timeout: 10
|
|
maximum_lag_on_failover: 1048576
|
|
postgresql:
|
|
use_pg_rewind: true
|
|
# use_slots: true
|
|
parameters:
|
|
# wal_level: hot_standby
|
|
# hot_standby: "on"
|
|
# wal_keep_segments: 8
|
|
# max_wal_senders: 5
|
|
# max_replication_slots: 5
|
|
# wal_log_hints: "on"
|
|
# archive_mode: "on"
|
|
# archive_timeout: 1800s
|
|
# archive_command: mkdir -p ../wal_archive && test ! -f ../wal_archive/%f && cp %p ../wal_archive/%f
|
|
# recovery_conf:
|
|
# restore_command: cp ../wal_archive/%f %p
|
|
|
|
# some desired options for 'initdb'
|
|
initdb: # Note: It needs to be a list (some options need values, others are switches)
|
|
- encoding: UTF8
|
|
- data-checksums
|
|
|
|
pg_hba: # Add following lines to pg_hba.conf after running 'initdb'
|
|
- host replication replicator 127.0.0.1/32 md5
|
|
- host all all 0.0.0.0/0 md5
|
|
# - hostssl all all 0.0.0.0/0 md5
|
|
|
|
# Some additional users users which needs to be created after initializing new cluster
|
|
users:
|
|
admin:
|
|
password: admin
|
|
options:
|
|
- createrole
|
|
- createdb
|
|
|
|
postgresql:
|
|
listen: 127.0.0.1:5434
|
|
connect_address: 127.0.0.1:5434
|
|
data_dir: data/postgresql2
|
|
# bin_dir:
|
|
pgpass: /tmp/pgpass2
|
|
authentication:
|
|
replication:
|
|
username: replicator
|
|
password: rep-pass
|
|
superuser:
|
|
username: postgres
|
|
password: zalando
|
|
parameters:
|
|
unix_socket_directories: '.'
|
|
tags:
|
|
nofailover: false
|
|
noloadbalance: false
|
|
clonefrom: false
|
|
replicatefrom: postgres1
|