galaxyproject / ansible-postgresql

An Ansible role for managing a PostgreSQL server
https://galaxy.ansible.com/galaxyproject/postgresql
122 stars 58 forks source link

Properly handle WAL directory in backup scripts for version >=10 #20

Closed yaroslav-shabalin closed 4 years ago

yaroslav-shabalin commented 5 years ago

According to official documentation in version 10 'pg_xlog' directory was renamed to 'pg_wal'. This pull request introduces conditional template evaluation depending on PostgreSQL version being installed.

Links to documentation: https://www.postgresql.org/docs/10/release-10.html#id-1.11.6.13.4 https://wiki.postgresql.org/wiki/New_in_postgres_10#Renaming_of_.22xlog.22_to_.22wal.22_Globally_.28and_location.2Flsn.29

natefoo commented 4 years ago

@yaroslav-shabalin thanks! I added a couple very minor changes.