EnterpriseDB / barman

Barman - Backup and Recovery Manager for PostgreSQL
https://www.pgbarman.org/
GNU General Public License v3.0
2.14k stars 193 forks source link

Replace checks on `parent_backup_id` with the property `is_incremental` #993

Closed andremagui closed 3 months ago

andremagui commented 3 months ago

In the beginning of the implementation of the incremental backups when released with PostgreSQL 17, we introduced a parent_backup_id field to the BackupInfo class, and we had been using that to distinguish between incremental and non-incremental backups.

At some point we introduced a new property is_incremental which abstracts that logic. However, that property started being used in new code after that, but was not used in the places where there were already checks on parent_backup_id.

This PR is taking care of that and replacing all checks made with parent_backup_id for the property is_incremental. Also the unit tests were all modified according to the changes in implementation.

References: BAR-276

barthisrael commented 3 months ago

Let's squash before merging.