Skip to content

Commit fdf7425

Browse files
committed
Majorly 5 changes
1. entries are moved to DCS section. This may simplify the DBA's work. 2. is converted to . Because PG18 is deprecating md5. 3. Sample . Because majority of deployement needs it. 4. Section for creating additional users are removed. Additional users can be created at anytime. 5. Sample section . Integration of Linux Watchdog is highly encouraged to perform STONITH / fencing when node hangs.
1 parent 41695a8 commit fdf7425

File tree

2 files changed

+28
-40
lines changed

2 files changed

+28
-40
lines changed

docs/solutions/ha-setup-apt.md

+14-20
Original file line numberDiff line numberDiff line change
@@ -357,31 +357,19 @@ Run the following commands on all nodes. You can do this in parallel:
357357
archive_mode: "on"
358358
archive_timeout: 600s
359359
archive_command: "cp -f %p /home/postgres/archived/%f"
360+
pg_hba:
361+
- local all all peer
362+
- host replication replicator 127.0.0.1/32 trust
363+
- host replication replicator 192.0.0.0/8 scram-sha-256
364+
- host all all 0.0.0.0/0 scram-sha-256
365+
recovery_conf:
366+
restore_command: cp /home/postgres/archived/%f %p
360367
361368
# some desired options for 'initdb'
362369
initdb: # Note: It needs to be a list (some options need values, others are switches)
363370
- encoding: UTF8
364371
- data-checksums
365-
366-
pg_hba: # Add following lines to pg_hba.conf after running 'initdb'
367-
- host replication replicator 127.0.0.1/32 trust
368-
- host replication replicator 0.0.0.0/0 md5
369-
- host all all 0.0.0.0/0 md5
370-
- host all all ::0/0 md5
371-
372-
# Some additional users which needs to be created after initializing new cluster
373-
users:
374-
admin:
375-
password: qaz123
376-
options:
377-
- createrole
378-
- createdb
379-
percona:
380-
password: qaz123
381-
options:
382-
- createrole
383-
- createdb
384-
372+
385373
postgresql:
386374
cluster_name: cluster_1
387375
listen: 0.0.0.0:5432
@@ -403,6 +391,12 @@ Run the following commands on all nodes. You can do this in parallel:
403391
basebackup:
404392
checkpoint: 'fast'
405393
394+
watchdog:
395+
mode: required # Allowed values: off, automatic, required
396+
device: /dev/watchdog
397+
safety_margin: 5
398+
399+
406400
tags:
407401
nofailover: false
408402
noloadbalance: false

docs/solutions/ha-setup-yum.md

+14-20
Original file line numberDiff line numberDiff line change
@@ -366,31 +366,19 @@ Run the following commands on all nodes. You can do this in parallel:
366366
archive_mode: "on"
367367
archive_timeout: 600s
368368
archive_command: "cp -f %p /home/postgres/archived/%f"
369+
pg_hba:
370+
- local all all peer
371+
- host replication replicator 127.0.0.1/32 trust
372+
- host replication replicator 192.0.0.0/8 scram-sha-256
373+
- host all all 0.0.0.0/0 scram-sha-256
374+
recovery_conf:
375+
restore_command: cp /home/postgres/archived/%f %p
369376
370377
# some desired options for 'initdb'
371378
initdb: # Note: It needs to be a list (some options need values, others are switches)
372379
- encoding: UTF8
373380
- data-checksums
374-
375-
pg_hba: # Add following lines to pg_hba.conf after running 'initdb'
376-
- host replication replicator 127.0.0.1/32 trust
377-
- host replication replicator 0.0.0.0/0 md5
378-
- host all all 0.0.0.0/0 md5
379-
- host all all ::0/0 md5
380-
381-
# Some additional users which needs to be created after initializing new cluster
382-
users:
383-
admin:
384-
password: qaz123
385-
options:
386-
- createrole
387-
- createdb
388-
percona:
389-
password: qaz123
390-
options:
391-
- createrole
392-
- createdb
393-
381+
394382
postgresql:
395383
cluster_name: cluster_1
396384
listen: 0.0.0.0:5432
@@ -412,6 +400,12 @@ Run the following commands on all nodes. You can do this in parallel:
412400
basebackup:
413401
checkpoint: 'fast'
414402
403+
watchdog:
404+
mode: required # Allowed values: off, automatic, required
405+
device: /dev/watchdog
406+
safety_margin: 5
407+
408+
415409
tags:
416410
nofailover: false
417411
noloadbalance: false

0 commit comments

Comments
 (0)