diff --git a/roles/pgbackrest/templates/pgbackrest.server.stanza.conf.j2 b/roles/pgbackrest/templates/pgbackrest.server.stanza.conf.j2 index f6b1c134a..c2de1194e 100644 --- a/roles/pgbackrest/templates/pgbackrest.server.stanza.conf.j2 +++ b/roles/pgbackrest/templates/pgbackrest.server.stanza.conf.j2 @@ -2,6 +2,7 @@ {% for host in groups['postgres_cluster'] %} pg{{ loop.index }}-host={{ host }} pg{{ loop.index }}-port={{ postgresql_port }} +pg{{ loop.index }}-socket-path={{ postgresql_unix_socket_dir }} pg{{ loop.index }}-path={{ postgresql_data_dir }} {% endfor %} diff --git a/vars/main.yml b/vars/main.yml index 3d74679cb..5f9026bc7 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -522,6 +522,7 @@ pgbackrest_conf: - { option: "process-max", value: "4" } - { option: "log-level-console", value: "info" } - { option: "recovery-option", value: "recovery_target_action=promote" } + - { option: "pg1-socket-path", value: "{{ postgresql_unix_socket_dir }}" } - { option: "pg1-path", value: "{{ postgresql_data_dir }}" } # - { option: "", value: "" } # (optional) dedicated backup server config (if "repo_host" is set)