scope: "@VERSION@-@CLUSTER@" namespace: "/postgresql-common/" name: @HOSTNAME@ @DCS_CONFIG@ restapi: listen: @HOSTIP@:8008 connect_address: @HOSTIP@:8008 # certfile: /etc/ssl/certs/ssl-cert-snakeoil.pem # keyfile: /etc/ssl/private/ssl-cert-snakeoil.key # authentication: # username: username # password: password # 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 bootstrap: # Custom bootstrap method method: pg_createcluster pg_createcluster: command: /usr/share/patroni/pg_createcluster_patroni # this section will be written into Etcd:///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 # master_start_timeout: 300 # synchronous_mode: false # standby_cluster: # host: 127.0.0.1 # port: 1111 # primary_slot_name: patroni postgresql: use_pg_rewind: true # use_slots: true parameters: # wal_level: hot_standby # hot_standby: "on" # wal_keep_segments: 8 # max_wal_senders: 10 # max_replication_slots: 10 # 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 # Add following lines to pg_hba.conf after running 'initdb'. The replication # user (replicator by default) should match the # "postgresql/authenticaion/replication/username" item below. # By default replication and md5 connection are allowed from the local # network. pg_hba: - host replication replicator 127.0.0.1/32 md5 - host replication replicator @NETWORK@ md5 - host all all @NETWORK@ md5 # - host all all 0.0.0.0/0 md5 # - hostssl all all 0.0.0.0/0 md5 postgresql: # Custom clone method create_replica_method: - pg_clonecluster pg_clonecluster: command: /usr/share/patroni/pg_clonecluster_patroni listen: @HOSTIP@:@PORT@ connect_address: @HOSTIP@:@PORT@ use_unix_socket: true data_dir: /var/lib/postgresql/@VERSION@/@CLUSTER@ bin_dir: /usr/lib/postgresql/@VERSION@/bin config_dir: /etc/postgresql/@VERSION@/@CLUSTER@ # optional pgpass file that patroni uses (has to exist) #pgpass: /etc/postgresql/11/patroni/pgpass authentication: replication: username: replicator password: rep-pass # A superuser role is required in order for Patroni to manage the local # Postgres instance. If the option `use_unix_socket' is set to `true', then # specifying an empty password results in no md5 password for the superuser # being set and sockets being used for authentication. The `password:' line is # nevertheless required. Note that pg_rewind will not work if no md5 password # is set. superuser: username: postgres password: parameters: unix_socket_directories: '/var/run/postgresql/' # Emulate default Debian/Ubuntu logging logging_collector: 'on' log_directory: '/var/log/postgresql' log_filename: 'postgresql-@VERSION@-@CLUSTER@.log'