]> git.immae.eu Git - github/fretlink/ansible-postgresql-role.git/blame - templates/recovery.conf.j2
recovery: optional restore_command & allow custom command if needed
[github/fretlink/ansible-postgresql-role.git] / templates / recovery.conf.j2
CommitLineData
d0bc90e0
P
1# This file is renamed to `recover.done` by postgres once the secondary is promoted
2# {{ ansible_managed }}
3
4standby_mode = 'on'
587f87bb
P
5{% if postgres_primary.restore_command is defined %}
6restore_command = '{{ postgres_primary.restore_command }}'
7{% elif postgres_primary.restore_barman_directory is defined %}
8restore_command = '/usr/bin/barman-wal-restore --user barman --parallel 8 {{ postgres_barman_server }} {{ postgres_primary.restore_barman_directory }} %f %p'
9{% endif %}
d0bc90e0
P
10primary_conninfo = 'host={{ postgres_primary.host }} port={{ postgres_primary.port }} user={{ postgres_primary.replication_user }} password={{ postgres_primary.replication_password }} sslmode=require'
11trigger_file = '/var/lib/postgresql/{{ postgres_version }}/{{ postgres_cluster_name }}/failover.trigger'
12recovery_target_timeline='latest'