2023-05-11 16:42:06 +00:00
|
|
|
postgresql_version: "15.3"
|
2023-02-07 23:13:12 +00:00
|
|
|
|
|
|
|
# Options
|
2023-03-29 20:47:01 +00:00
|
|
|
postgresql_install_official_repo: true
|
2023-02-17 15:13:08 +00:00
|
|
|
postgresql_play_group: "postgresql"
|
2023-02-09 21:49:13 +00:00
|
|
|
postgresql_superuser_db: "postgres"
|
2023-02-17 15:13:08 +00:00
|
|
|
postgresql_superuser_username: "postgres"
|
2023-02-07 23:13:12 +00:00
|
|
|
postgresql_superuser_password: "postgres"
|
|
|
|
|
|
|
|
# SSL options
|
2023-02-09 21:49:13 +00:00
|
|
|
postgresql_ssl: true
|
2023-02-15 13:16:09 +00:00
|
|
|
postgresql_ssl_keep_nonssl_endpoint: false
|
2023-02-09 21:49:13 +00:00
|
|
|
postgresql_self_signed_cert: true
|
2023-02-07 23:13:12 +00:00
|
|
|
postgresql_self_signed_cert_name: "cert"
|
|
|
|
|
2023-07-21 14:14:47 +00:00
|
|
|
## WAL-G backup and restore options
|
2023-02-09 21:49:13 +00:00
|
|
|
postgresql_wal_g_install: false
|
2023-07-21 14:14:47 +00:00
|
|
|
postgresql_wal_g_restore_from_backup: false
|
2023-02-17 15:13:08 +00:00
|
|
|
postgresql_wal_g_force_delete_and_restore: false
|
|
|
|
postgresql_wal_g_config_name: ".walg.json"
|
|
|
|
postgresql_wal_g_restore_config_name: ".walg-restore.json"
|
2023-07-21 14:14:47 +00:00
|
|
|
postgresql_wal_g_pitr: 'latest'
|
|
|
|
postgresql_wal_g_restore_backup_name: 'LATEST'
|
2023-02-17 15:13:08 +00:00
|
|
|
postgresql_wal_g_binary_name: "wal-g-pg"
|
2023-07-31 20:44:44 +00:00
|
|
|
#postgresql_postgresql_archive_command: "wal-g wal-push %p"
|
|
|
|
#postgresql_postgresql_restore_command: "wal-g wal-fetch %f %p"
|
|
|
|
#postgresql_restore_dbs_from_backup_command: "wal-g backup-fetch {{ postgresql_wal_g_restore_backup_name }}"
|
|
|
|
#postgresql_restore_wals_from_backup_command: "wal-g wal-fetch %f %p"
|
2023-07-21 14:14:47 +00:00
|
|
|
|
2023-02-21 13:14:02 +00:00
|
|
|
postgresql_recovery_target_time: ""
|
2023-02-17 15:13:08 +00:00
|
|
|
postgresql_promote_trigger_file: "{{ postgresql_data_dir }}/promote.trigger"
|
2023-02-07 23:13:12 +00:00
|
|
|
|
|
|
|
postgresql_password_encryption_algorithm: "scram-sha-256"
|
|
|
|
postgresql_default_parameters:
|
2023-02-09 21:49:13 +00:00
|
|
|
data_directory: '{{ postgresql_data_dir }}'
|
2023-07-21 14:14:47 +00:00
|
|
|
archive_mode: "{{ postgresql_archive_mode | default('on') }}"
|
2023-02-07 23:13:12 +00:00
|
|
|
listen_addresses: '*'
|
|
|
|
max_connections: '1000'
|
|
|
|
superuser_reserved_connections: '5'
|
|
|
|
shared_buffers: '{{ (ansible_memory_mb.real.total * 0.25) | round | int }}MB'
|
|
|
|
huge_pages: 'try'
|
|
|
|
dynamic_shared_memory_type: 'posix'
|
|
|
|
max_worker_processes: '{{ ansible_processor_vcpus }}'
|
|
|
|
max_parallel_workers: '{{ ansible_processor_vcpus }}'
|
|
|
|
max_parallel_workers_per_gather: '{{ (ansible_processor_vcpus / 2) | round | int }}'
|
|
|
|
max_parallel_maintenance_workers: '{{ (ansible_processor_vcpus / 2) | round | int }}'
|
|
|
|
max_wal_size: '1GB'
|
|
|
|
min_wal_size: '80MB'
|
|
|
|
log_destination: 'stderr'
|
|
|
|
logging_collector: 'on'
|
|
|
|
log_directory: 'log'
|
|
|
|
log_filename: 'postgresql-%a.log'
|
|
|
|
log_rotation_age: '1d'
|
|
|
|
log_rotation_size: '0'
|
|
|
|
log_truncate_on_rotation: 'on'
|
|
|
|
log_line_prefix: '%m [%p] '
|
|
|
|
datestyle: 'iso, mdy'
|
2023-02-09 21:49:13 +00:00
|
|
|
lc_messages: '{{ postgresql_system_locale | default("en_US.UTF-8") }}'
|
|
|
|
lc_monetary: '{{ postgresql_system_locale | default("en_US.UTF-8") }}'
|
|
|
|
lc_numeric: '{{ postgresql_system_locale | default("en_US.UTF-8") }}'
|
|
|
|
lc_time: '{{ postgresql_system_locale | default("en_US.UTF-8") }}'
|
2023-02-07 23:13:12 +00:00
|
|
|
default_text_search_config: 'pg_catalog.english'
|
|
|
|
password_encryption: '{{ postgresql_password_encryption_algorithm }}'
|
2023-02-21 13:14:02 +00:00
|
|
|
hot_standby: 'off'
|
2023-02-17 15:13:08 +00:00
|
|
|
promote_trigger_file: '{{ postgresql_promote_trigger_file }}'
|
2023-02-07 23:13:12 +00:00
|
|
|
|
|
|
|
postgresql_backup_parameters:
|
|
|
|
archive_command: "{{ postgresql_archive_command | default('cd .')}}"
|
2023-07-21 14:14:47 +00:00
|
|
|
|
|
|
|
postgresql_restore_parameters:
|
2023-02-07 23:13:12 +00:00
|
|
|
restore_command: "{{ postgresql_restore_command | default('cd .') }}"
|
|
|
|
|
|
|
|
postgresql_log_dir: "/var/log/postgresql"
|
|
|
|
|
2023-07-31 20:44:44 +00:00
|
|
|
|
2023-02-07 23:13:12 +00:00
|
|
|
postgresql_supported_versions:
|
|
|
|
- 13
|
|
|
|
- 14
|
|
|
|
- 15
|