mirror of
https://gitea.0xace.cc/ansible-galaxy/postgresql.git
synced 2025-06-28 18:03:08 +00:00
refactor, add postgresql 16 as supported and fix pitr
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
postgresql_version: "15.7"
|
||||
postgresql_version: "16.3"
|
||||
|
||||
# Options
|
||||
postgresql_install_official_repo: true
|
||||
@ -23,19 +23,22 @@ postgresql_cacert_ca_trust_anchors_update: true
|
||||
|
||||
## WAL-G backup and restore options
|
||||
postgresql_wal_g_install: false
|
||||
postgresql_wal_g_backup_enable: false
|
||||
postgresql_wal_g_restore_from_backup: false
|
||||
postgresql_wal_g_force_delete_and_restore: false
|
||||
postgresql_wal_g_config_name: ".walg.json"
|
||||
postgresql_wal_g_restore_config_name: ".walg-restore.json"
|
||||
postgresql_wal_g_pitr: 'latest'
|
||||
postgresql_wal_g_restore_backup_name: 'LATEST'
|
||||
postgresql_wal_g_binary_name: "wal-g-pg"
|
||||
#postgresql_postgresql_archive_command: "wal-g-pg wal-push %p"
|
||||
#postgresql_postgresql_restore_command: "wal-g-pg wal-fetch %f %p"
|
||||
#postgresql_restore_dbs_from_backup_command: "wal-g-pg backup-fetch {{ postgresql_wal_g_restore_backup_name }}"
|
||||
#postgresql_restore_wals_from_backup_command: "wal-g-pg wal-fetch %f %p"
|
||||
postgresql_wal_g_pitr: ""
|
||||
postgresql_wal_g_restore_backup_name: "LATEST"
|
||||
postgresql_wal_g_binary: "/usr/bin/wal-g-pg"
|
||||
postgresql_archive_command: "{{ postgresql_wal_g_binary }} wal-push %p"
|
||||
postgresql_restore_command: "{{ postgresql_wal_g_binary }} wal-fetch %f %p"
|
||||
postgresql_restore_dbs_from_backup_command: "{{ postgresql_wal_g_binary }} backup-fetch {{ postgresql_wal_g_restore_backup_name }}"
|
||||
postgresql_restore_wals_from_backup_command: "{{ postgresql_wal_g_binary }} wal-fetch %f %p"
|
||||
|
||||
postgresql_recovery_target_time: ""
|
||||
postgresql_recovery_target_timeline: "latest"
|
||||
postgresql_recovery_target_action: "promote"
|
||||
postgresql_promote_trigger_file: "{{ postgresql_data_dir }}/promote.trigger"
|
||||
|
||||
postgresql_password_encryption_algorithm: "scram-sha-256"
|
||||
@ -64,7 +67,7 @@ postgresql_default_parameters:
|
||||
wal_buffers: '16MB'
|
||||
log_destination: 'stderr'
|
||||
logging_collector: 'on'
|
||||
log_directory: 'log'
|
||||
log_directory: '/var/log/postgresql'
|
||||
log_filename: 'postgresql-%a.log'
|
||||
log_rotation_age: '1d'
|
||||
log_rotation_size: '0'
|
||||
@ -78,13 +81,17 @@ postgresql_default_parameters:
|
||||
default_text_search_config: 'pg_catalog.english'
|
||||
password_encryption: '{{ postgresql_password_encryption_algorithm }}'
|
||||
hot_standby: 'off'
|
||||
promote_trigger_file: '{{ postgresql_promote_trigger_file }}'
|
||||
|
||||
postgresql_backup_parameters:
|
||||
archive_command: "{{ postgresql_archive_command | default('cd .')}}"
|
||||
archive_command: "{{ postgresql_archive_command if postgresql_wal_g_backup_enable else 'cd .' }}"
|
||||
|
||||
postgresql_restore_parameters:
|
||||
restore_command: "{{ postgresql_restore_command | default('cd .') }}"
|
||||
restore_command: "{{ postgresql_restore_command if postgresql_wal_g_backup_enable else 'cd .' }}"
|
||||
|
||||
postgresql_restore_pitr_parameters:
|
||||
recovery_target_time: "{{ postgresql_wal_g_pitr }}"
|
||||
recovery_target_timeline: "{{ postgresql_recovery_target_timeline }}"
|
||||
recovery_target_action: "{{ postgresql_recovery_target_action }}"
|
||||
|
||||
postgresql_log_dir: "/var/log/postgresql"
|
||||
|
||||
@ -93,3 +100,4 @@ postgresql_supported_versions:
|
||||
- 13
|
||||
- 14
|
||||
- 15
|
||||
- 16
|
||||
|
Reference in New Issue
Block a user