diff options
author | Paul B <paul@bonaud.fr> | 2020-05-28 15:21:12 +0200 |
---|---|---|
committer | Paul B <paul@bonaud.fr> | 2020-05-28 18:41:06 +0200 |
commit | 587f87bbf278a80b14a182146724a9ebf1fd98a2 (patch) | |
tree | 0e7e023c1b7f580db314c78bf3b65b70563efcc7 /README.md | |
parent | ebe451adda84672f9872187164df279dbfed7a35 (diff) | |
download | ansible-postgresql-role-587f87bbf278a80b14a182146724a9ebf1fd98a2.tar.gz ansible-postgresql-role-587f87bbf278a80b14a182146724a9ebf1fd98a2.tar.zst ansible-postgresql-role-587f87bbf278a80b14a182146724a9ebf1fd98a2.zip |
recovery: optional restore_command & allow custom command if needed
Right now the role assumes you always want to use barman-wal-restore
script as a restore command to recover WAL files at startup time of a
standby server.
This PR adds a new `primary.restore_command` option which lets you
override the command to use.
⚠️ Breaking change: the PR renames the existing
`primary.restore_directory` option to
`primary.restore_barman_directory` ⚠️ in order to give more context to
this option which will automatically use the `barman-wal-restore`
script as a restore command.
Finally if none of the two options specified above are specified in
the `primary:` object then the `restore_command` is left commented out
in the PG configuration (which is totally fine as it will try to
recover WALs from the primary server directly see
[documentation](https://www.postgresql.org/docs/12/warm-standby.html#STANDBY-SERVER-OPERATION))
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -49,6 +49,17 @@ postgres_clusters: # Mandatory | |||
49 | checksums: True # Optional | 49 | checksums: True # Optional |
50 | fsync_enabled: False # Optional | 50 | fsync_enabled: False # Optional |
51 | archive_enabled: False # Optional | 51 | archive_enabled: False # Optional |
52 | wal_level: 'logical' # Optional | ||
53 | max_replication_slots: 10 # Optional | ||
54 | barman_directory: None # Optional | ||
55 | # Define cluster as a standby server | ||
56 | primary: # Optional | ||
57 | host: '127.0.1.1' # Mandatory | ||
58 | port: 5433 # Mandatory | ||
59 | replication_user: 'replicator' # Mandatory | ||
60 | replication_password: 'SuperSecret' # Mandatory | ||
61 | restore_command: None # Optional | ||
62 | restore_barman_directory: None # Optional | ||
52 | # List of users to be created (optional) | 63 | # List of users to be created (optional) |
53 | users: | 64 | users: |
54 | - username: 'replicator' # Mandatory | 65 | - username: 'replicator' # Mandatory |