1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00
pgbackrest/test
David Steele 762498f4cd
Fix time-based archive expiration when no backups are expired.
In the case that no backups were expired but time-based retention was met no archive expiration would occur and the following would be logged:

INFO: time-based archive retention not met - archive logs will not be expired

In most cases this was harmless, but when retention was first met or if retention was increased, it would require one additional backup to expire earlier WAL. After that expiration worked as normal.

Even once expiration was working normally the message would continue to be output, which was pretty misleading since retention had been met, even though there was nothing to do.

Bring this code in line with count-based retention, i.e. always log what should be expired at detail level (even if nothing will be expired) and then log info about what was expired (even if nothing is expired). For example:

DETAIL: repo1: 11-1 archive retention on backup 20181119-152138F, start = 000000010000000000000002
INFO: repo1: 11-1 no archive to remove
2023-07-06 11:27:00 +02:00
..
certificate SFTP support for repository storage. 2023-05-13 19:16:16 +03:00
code-count v2.46: Block Incremental Backup and SFTP Storage 2023-05-22 11:13:13 +03:00
data
lib/pgBackRestTest Remove unresolved todo from 87087fac. 2023-06-29 11:08:58 +02:00
src Fix time-based archive expiration when no backups are expired. 2023-07-06 11:27:00 +02:00
.gitignore Move coverage results to test/result. 2020-03-14 15:29:42 -04:00
ci.pl Remove user-facing documentation references to --vm=none. 2023-05-23 10:58:51 +03:00
container.yaml Update Fedora test image to Fedora 38. 2023-06-22 18:23:06 +02:00
define.yaml SFTP support for repository storage. 2023-05-13 19:16:16 +03:00
Dockerfile SFTP support for repository storage. 2023-05-13 19:16:16 +03:00
test.pl Remove double spaces from comments and documentation. 2023-05-02 12:57:12 +03:00
uncrustify.cfg Check for stray execute permissions in test.pl --code-format. 2023-02-01 12:57:04 +07:00
Vagrantfile SFTP support for repository storage. 2023-05-13 19:16:16 +03:00