Aiven-Open / pghoard

PostgreSQL® backup and restore service
http://aiven-open.github.io/pghoard/
Apache License 2.0
1.32k stars 97 forks source link

remove pg home dir from promote_trigger_file config #587

Closed kathia-barahona closed 1 year ago

kathia-barahona commented 1 year ago

About this change - What it does

Uses relative path of pgdata directory instead of absolute path. Tested with the following steps:

  1. Stop master pg service
  2. Created trigger_file on standby's pg data directory
  3. Double checking if standby was promoted

Resolves: #BF-729

Why this way

This way we don't expose entire structure of the filesystem for pgdata directory

codecov[bot] commented 1 year ago

Codecov Report

Merging #587 (1800a43) into main (b2b8465) will not change coverage. The diff coverage is n/a.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/aiven/pghoard/pull/587/graphs/tree.svg?width=650&height=150&src=pr&token=nLr7M7hvCx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiven)](https://app.codecov.io/gh/aiven/pghoard/pull/587?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiven) ```diff @@ Coverage Diff @@ ## main #587 +/- ## ======================================= Coverage 91.30% 91.30% ======================================= Files 32 32 Lines 4683 4683 ======================================= Hits 4276 4276 Misses 407 407 ``` | [Impacted Files](https://app.codecov.io/gh/aiven/pghoard/pull/587?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiven) | Coverage Δ | | |---|---|---| | [pghoard/restore.py](https://app.codecov.io/gh/aiven/pghoard/pull/587?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiven#diff-cGdob2FyZC9yZXN0b3JlLnB5) | `89.61% <ø> (ø)` | |