|
| 1 | +#scope: batman |
| 2 | +#namespace: /service/ |
| 3 | +#name: postgresql0 |
| 4 | + |
| 5 | +restapi: |
| 6 | + listen: 0.0.0.0:8008 |
| 7 | +# connect_address: 127.0.0.1:8008 |
| 8 | +# cafile: /etc/ssl/certs/ssl-cacert-snakeoil.pem |
| 9 | +# certfile: /etc/ssl/certs/ssl-cert-snakeoil.pem |
| 10 | +# keyfile: /etc/ssl/private/ssl-cert-snakeoil.key |
| 11 | +# authentication: |
| 12 | +# username: username |
| 13 | +# password: password |
| 14 | + |
| 15 | +#ctl: |
| 16 | +# insecure: false # Allow connections to Patroni REST API without verifying certificates |
| 17 | +# certfile: /etc/ssl/certs/ssl-cert-snakeoil.pem |
| 18 | +# keyfile: /etc/ssl/private/ssl-cert-snakeoil.key |
| 19 | +# cacert: /etc/ssl/certs/ssl-cacert-snakeoil.pem |
| 20 | + |
| 21 | + #etcd: |
| 22 | + #Provide host to do the initial discovery of the cluster topology: |
| 23 | +# host: 127.0.0.1:2379 |
| 24 | + #Or use "hosts" to provide multiple endpoints |
| 25 | + #Could be a comma separated string: |
| 26 | + #hosts: host1:port1,host2:port2 |
| 27 | + #or an actual yaml list: |
| 28 | + #hosts: |
| 29 | + #- host1:port1 |
| 30 | + #- host2:port2 |
| 31 | + #Once discovery is complete Patroni will use the list of advertised clientURLs |
| 32 | + #It is possible to change this behavior through by setting: |
| 33 | + #use_proxies: true |
| 34 | + |
| 35 | +#raft: |
| 36 | +# data_dir: . |
| 37 | +# self_addr: 127.0.0.1:2222 |
| 38 | +# partner_addrs: |
| 39 | +# - 127.0.0.1:2223 |
| 40 | +# - 127.0.0.1:2224 |
| 41 | + |
| 42 | +# The bootstrap configuration. Works only when the cluster is not yet initialized. |
| 43 | +# If the cluster is already initialized, all changes in the `bootstrap` section are ignored! |
| 44 | +bootstrap: |
| 45 | + # This section will be written into Etcd:/<namespace>/<scope>/config after initializing new cluster |
| 46 | + # and all other cluster members will use it as a `global configuration`. |
| 47 | + # WARNING! If you want to change any of the parameters that were set up |
| 48 | + # via `bootstrap.dcs` section, please use `patronictl edit-config`! |
| 49 | + dcs: |
| 50 | + ttl: 30 |
| 51 | + loop_wait: 10 |
| 52 | + retry_timeout: 10 |
| 53 | + maximum_lag_on_failover: 1048576 |
| 54 | +# primary_start_timeout: 300 |
| 55 | +# synchronous_mode: false |
| 56 | + #standby_cluster: |
| 57 | + #host: 127.0.0.1 |
| 58 | + #port: 1111 |
| 59 | + #primary_slot_name: patroni |
| 60 | + postgresql: |
| 61 | + use_pg_rewind: true |
| 62 | + pg_hba: |
| 63 | + - local all all trust |
| 64 | + # For kerberos gss based connectivity (discard @.*$) |
| 65 | + #- host replication replicator 127.0.0.1/32 gss include_realm=0 |
| 66 | + #- host all all 0.0.0.0/0 gss include_realm=0 |
| 67 | + - host replication replicator all md5 |
| 68 | + - host all all all md5 |
| 69 | + # - hostssl all all all md5 |
| 70 | +# use_slots: true |
| 71 | + parameters: |
| 72 | + max_connections: 100 |
| 73 | +# wal_level: hot_standby |
| 74 | +# hot_standby: "on" |
| 75 | +# max_connections: 100 |
| 76 | +# max_worker_processes: 8 |
| 77 | +# wal_keep_segments: 8 |
| 78 | +# max_wal_senders: 10 |
| 79 | +# max_replication_slots: 10 |
| 80 | +# max_prepared_transactions: 0 |
| 81 | +# max_locks_per_transaction: 64 |
| 82 | +# wal_log_hints: "on" |
| 83 | +# track_commit_timestamp: "off" |
| 84 | +# archive_mode: "on" |
| 85 | +# archive_timeout: 1800s |
| 86 | +# archive_command: mkdir -p ../wal_archive && test ! -f ../wal_archive/%f && cp %p ../wal_archive/%f |
| 87 | +# recovery_conf: |
| 88 | +# restore_command: cp ../wal_archive/%f %p |
| 89 | + |
| 90 | + # some desired options for 'initdb' |
| 91 | + initdb: # Note: It needs to be a list (some options need values, others are switches) |
| 92 | + - locale: en_US.UTF-8 |
| 93 | + - encoding: UTF8 |
| 94 | + - data-checksums |
| 95 | + |
| 96 | + # Additional script to be launched after initial cluster creation (will be passed the connection URL as parameter) |
| 97 | +# post_init: /usr/local/bin/setup_cluster.sh |
| 98 | + |
| 99 | +postgresql: |
| 100 | + listen: 0.0.0.0:5432 |
| 101 | +# connect_address: 127.0.0.1:5432 |
| 102 | + |
| 103 | +# proxy_address: 127.0.0.1:5433 # The address of connection pool (e.g., pgbouncer) running next to Patroni/Postgres. Only for service discovery. |
| 104 | + data_dir: /var/lib/postgresql/data |
| 105 | +# bin_dir: |
| 106 | + config_dir: /var/lib/postgresql/data |
| 107 | + pgpass: /tmp/pgpass0 |
| 108 | +# authentication: |
| 109 | +# replication: |
| 110 | +# username: replicator |
| 111 | +# password: rep-pass |
| 112 | +# superuser: |
| 113 | +# username: postgres |
| 114 | +# password: patroni |
| 115 | +# rewind: # Has no effect on postgres 10 and lower |
| 116 | +# username: rewind_user |
| 117 | +# password: rewind_password |
| 118 | + # Server side kerberos spn |
| 119 | +# krbsrvname: postgres |
| 120 | +# parameters: |
| 121 | + # Fully qualified kerberos ticket file for the running user |
| 122 | + # same as KRB5CCNAME used by the GSS |
| 123 | +# krb_server_keyfile: /var/spool/keytabs/postgres |
| 124 | +# unix_socket_directories: '..' # parent directory of data_dir |
| 125 | + # Additional fencing script executed after acquiring the leader lock but before promoting the replica |
| 126 | + #pre_promote: /path/to/pre_promote.sh |
| 127 | + |
| 128 | +#watchdog: |
| 129 | +# mode: automatic # Allowed values: off, automatic, required |
| 130 | +# device: /dev/watchdog |
| 131 | +# safety_margin: 5 |
| 132 | + |
| 133 | +tags: |
| 134 | + # failover_priority: 1 |
| 135 | + # sync_priority: 1 |
| 136 | + noloadbalance: false |
| 137 | + clonefrom: false |
| 138 | + nostream: false |
0 commit comments