vitabaks / postgresql_cluster

PostgreSQL High-Availability Cluster (based on Patroni). Automating with Ansible.
https://postgresql-cluster.org
MIT License
1.48k stars 394 forks source link

Fix (Upgrade): Update pg-path in local pgbackrest.conf #700

Closed vitabaks closed 1 month ago

vitabaks commented 1 month ago
  1. Update pg-path in local pgbackrest.conf

    • The conditions of the task block were incorrect, which is why the local configuration file was not updated. \ As a result, we encountered errors archiving WAL and backing up to a dedicated pgBackRest server because the new version of Postgres was indicated there while the old version was still in the local configuration.\ This fix ensures that the pg-path option will be updated on both the dedicated server and the local database servers.
  2. Update the grep command and use the replace module.

    • Make the code more reliable by using the replace module instead of lineinfile, which will prevent adding new lines instead of changing the content. Also, change the conditions of the grep command to look for a more accurate match for the pgN-path option.