Skip to content

Commit 6b32bc0

Browse files
committed
Updated Patroni config for 4.0.x versions
1 parent 82ede94 commit 6b32bc0

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

docs/solutions/ha-patroni.md

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -183,30 +183,20 @@ bootstrap:
183183
archive_mode: "on"
184184
archive_timeout: 600s
185185
archive_command: "cp -f %p /home/postgres/archived/%f"
186+
187+
pg_hba: # Add following lines to pg_hba.conf after running 'initdb'
188+
- host replication replicator 127.0.0.1/32 trust
189+
- host replication replicator 0.0.0.0/0 md5
190+
- host all all 0.0.0.0/0 md5
191+
- host all all ::0/0 md5
192+
recovery_conf:
193+
restore_command: cp /home/postgres/archived/%f %p
186194
187195
# some desired options for 'initdb'
188196
initdb: # Note: It needs to be a list (some options need values, others are switches)
189197
- encoding: UTF8
190198
- data-checksums
191199
192-
pg_hba: # Add following lines to pg_hba.conf after running 'initdb'
193-
- host replication replicator 127.0.0.1/32 trust
194-
- host replication replicator 0.0.0.0/0 md5
195-
- host all all 0.0.0.0/0 md5
196-
- host all all ::0/0 md5
197-
198-
# Some additional users which needs to be created after initializing new cluster
199-
users:
200-
admin:
201-
password: qaz123
202-
options:
203-
- createrole
204-
- createdb
205-
percona:
206-
password: qaz123
207-
options:
208-
- createrole
209-
- createdb
210200
211201
postgresql:
212202
cluster_name: cluster_1
@@ -229,6 +219,11 @@ postgresql:
229219
basebackup:
230220
checkpoint: 'fast'
231221
222+
watchdog:
223+
mode: required # Allowed values: off, automatic, required
224+
device: /dev/watchdog
225+
safety_margin: 5
226+
232227
tags:
233228
nofailover: false
234229
noloadbalance: false

0 commit comments

Comments
 (0)