mirror of
https://gitea.0xace.cc/ansible-galaxy/patroni.git
synced 2025-06-29 02:53:07 +00:00
refactor and fix pitr
This commit is contained in:
@ -16,6 +16,7 @@ patroni_postgresql_system_locale: "en_US.UTF-8"
|
||||
patroni_postgresql_system_language: "{{ patroni_postgresql_system_locale }}"
|
||||
|
||||
# Patroni superuser auth
|
||||
patroni_superuser_db: "postgres"
|
||||
patroni_superuser_username: "postgres"
|
||||
patroni_superuser_password: "postgres"
|
||||
|
||||
@ -48,9 +49,9 @@ patroni_dcs_type: "consul"
|
||||
## WAL-G backup and restore options
|
||||
patroni_wal_g_install: false
|
||||
patroni_wal_g_restore_from_backup: false
|
||||
patroni_wal_g_pitr: 'latest'
|
||||
patroni_wal_g_restore_backup_name: 'LATEST'
|
||||
patroni_wal_g_pg_binary_name: 'wal-g-pg'
|
||||
patroni_wal_g_pitr: ""
|
||||
patroni_wal_g_restore_backup_name: "LATEST"
|
||||
patroni_wal_g_pg_binary: "/usr/bin/wal-g-pg"
|
||||
patroni_wal_g_config_name: ".walg.json"
|
||||
patroni_wal_g_restore_config_name: ".walg-restore.json"
|
||||
patroni_restore_script: "{{ patroni_postgresql_home_dir }}/restore.sh"
|
||||
@ -66,6 +67,9 @@ patroni_wal_g_create_replica_methods:
|
||||
patroni_basebackup_create_replica_methods:
|
||||
- {option: "max-rate", value: "1000M"}
|
||||
- {option: "checkpoint", value: "fast"}
|
||||
patroni_recovery_target_time: ""
|
||||
patroni_recovery_target_action: "promote"
|
||||
patroni_recovery_target_timeline: "latest"
|
||||
|
||||
# More examples
|
||||
# patroni_postgresql_restore_command: "pgbackrest --stanza={{ pgbackrest_stanza }} archive-get %f %p" # restore WAL-s using pgbackrest
|
||||
@ -111,8 +115,8 @@ patroni_postgresql_dynamic_parameters: {}
|
||||
patroni_postgresql_backup_parameters:
|
||||
postgresql:
|
||||
parameters:
|
||||
archive_command: "{{ patroni_postgresql_archive_command if patroni_wal_g_install else 'cd .' }}"
|
||||
restore_command: "{{ patroni_postgresql_restore_command if patroni_wal_g_install else 'cd .' }}"
|
||||
archive_command: "{{ patroni_postgresql_archive_command if patroni_wal_g_backup_enable else 'cd .' }}"
|
||||
restore_command: "{{ patroni_postgresql_restore_command if patroni_wal_g_backup_enable else 'cd .' }}"
|
||||
|
||||
# postgresql parameters to bootstrap dcs (are parameters for example)
|
||||
patroni_postgresql_max_connections: "1000"
|
||||
|
Reference in New Issue
Block a user