2017-09-14 14:55:13 +02:00
|
|
|
scope: batman
|
|
|
|
#namespace: /service/
|
|
|
|
name: postgresql0
|
|
|
|
|
|
|
|
restapi:
|
|
|
|
listen: 127.0.0.1:8008
|
|
|
|
connect_address: 127.0.0.1:8008
|
|
|
|
# certfile: /etc/ssl/certs/ssl-cert-snakeoil.pem
|
|
|
|
# keyfile: /etc/ssl/private/ssl-cert-snakeoil.key
|
|
|
|
# authentication:
|
|
|
|
# username: username
|
|
|
|
# password: password
|
|
|
|
|
2018-09-27 23:10:40 +02:00
|
|
|
# ctl:
|
|
|
|
# insecure: false # Allow connections to SSL sites without certs
|
|
|
|
# certfile: /etc/ssl/certs/ssl-cert-snakeoil.pem
|
|
|
|
# cacert: /etc/ssl/certs/ssl-cacert-snakeoil.pem
|
|
|
|
|
2017-10-21 11:00:09 +02:00
|
|
|
#etcd:
|
|
|
|
# host: 127.0.0.1:2379
|
|
|
|
|
|
|
|
#consul:
|
|
|
|
# host: http://127.0.0.1:8500
|
|
|
|
# host: https://127.0.0.1:8500
|
|
|
|
|
|
|
|
zookeeper:
|
|
|
|
hosts: 127.0.0.1:2181
|
2017-09-14 14:55:13 +02:00
|
|
|
|
|
|
|
bootstrap:
|
2017-10-21 11:00:09 +02:00
|
|
|
# this section will be written into /<namespace>/<scope>/config after initializing new cluster
|
2017-09-14 14:55:13 +02:00
|
|
|
# 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
|
|
|
|
# master_start_timeout: 300
|
|
|
|
# synchronous_mode: false
|
2018-09-27 23:10:40 +02:00
|
|
|
# standby_cluster:
|
|
|
|
# host: 127.0.0.1
|
|
|
|
# port: 1111
|
|
|
|
# primary_slot_name: patroni
|
2017-09-14 14:55:13 +02:00
|
|
|
postgresql:
|
|
|
|
use_pg_rewind: true
|
|
|
|
# use_slots: true
|
|
|
|
parameters:
|
|
|
|
# wal_level: hot_standby
|
|
|
|
# hot_standby: "on"
|
|
|
|
# wal_keep_segments: 8
|
2018-09-27 23:10:40 +02:00
|
|
|
# max_wal_senders: 10
|
|
|
|
# max_replication_slots: 10
|
2017-09-14 14:55:13 +02:00
|
|
|
# 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
|
|
|
|
|
|
|
|
# Additional script to be launched after initial cluster creation (will be passed the connection URL as parameter)
|
|
|
|
# post_init: /usr/local/bin/setup_cluster.sh
|
|
|
|
|
|
|
|
# # 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:5432
|
|
|
|
connect_address: 127.0.0.1:5432
|
|
|
|
# data_dir: /var/lib/postgresql/9.6/main
|
|
|
|
# bin_dir: /usr/lib/postgresql/9.6/bin
|
|
|
|
# config_dir: /etc/postgresql/9.6/main
|
|
|
|
pgpass: /etc/patroni/pgpass
|
|
|
|
authentication:
|
|
|
|
replication:
|
|
|
|
username: replicator
|
|
|
|
password: rep-pass
|
|
|
|
# superuser:
|
|
|
|
# username: postgres
|
|
|
|
# password: zalando
|
|
|
|
parameters:
|
|
|
|
unix_socket_directories: '/var/run/postgresql'
|
|
|
|
|
|
|
|
#watchdog:
|
|
|
|
# mode: automatic # Allowed values: off, automatic, required
|
|
|
|
# device: /dev/watchdog
|
|
|
|
# safety_margin: 5
|
|
|
|
|
|
|
|
tags:
|
|
|
|
nofailover: false
|
|
|
|
noloadbalance: false
|
|
|
|
clonefrom: false
|
|
|
|
nosync: false
|