1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-05-22 10:15:16 +02:00

The expire command is implemented entirely in C.

This implementation duplicates the functionality of the Perl code but does so with different logic and includes full unit tests.

Along the way at least one bug was fixed, see issue #748.

Contributed by Cynthia Shang.
This commit is contained in:
David Steele
2019-06-18 15:19:20 -04:00
parent f88bee7b33
commit 434cd83285
15 changed files with 1585 additions and 893 deletions
+2
View File
@@ -3353,6 +3353,7 @@ P00 INFO: new backup label = [BACKUP-DIFF-6]
P00 INFO: backup command end: completed successfully
P00 INFO: expire command begin
P00 INFO: option 'repo1-retention-archive' is not set - archive logs will not be expired
P00 INFO: http statistics:[HTTP-STATISTICS]
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
@@ -3560,6 +3561,7 @@ P00 INFO: new backup label = [BACKUP-DIFF-7]
P00 INFO: backup command end: completed successfully
P00 INFO: expire command begin
P00 INFO: option 'repo1-retention-archive' is not set - archive logs will not be expired
P00 INFO: http statistics:[HTTP-STATISTICS]
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
+2
View File
@@ -476,6 +476,7 @@ P00 INFO: remove expired backup [BACKUP-FULL-1]
P00 DETAIL: archive retention on backup [BACKUP-FULL-2], archiveId = 9.2-1, start = 00000001000000000000000C
P00 DETAIL: remove archive: archiveId = 9.2-1, start = 000000010000000000000000, stop = 00000001000000000000000B
P00 DETAIL: archive retention on backup [BACKUP-FULL-3], archiveId = 9.3-2, start = 000000010000000000000000
P00 DETAIL: no archive to remove, archiveId = 9.3-2
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
@@ -1147,6 +1148,7 @@ P00 INFO: remove archive path: [TEST_PATH]/db-master/repo/archive/db/9.2-1
P00 DETAIL: archive retention on backup [BACKUP-FULL-4], archiveId = 9.3-2, start = 0000000100000000000000FF
P00 DETAIL: remove archive: archiveId = 9.3-2, start = 000000010000000000000000, stop = 0000000100000000000000FE
P00 DETAIL: archive retention on backup [BACKUP-FULL-5], archiveId = 10-3, start = 000000010000000000000000
P00 DETAIL: no archive to remove, archiveId = 10-3
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
+1 -3
View File
@@ -535,8 +535,7 @@ P00 INFO: full backup size = 48MB
P00 INFO: new backup label = [BACKUP-FULL-1]
P00 INFO: backup command end: completed successfully
P00 INFO: expire command begin
P00 INFO: remove archive path: [TEST_PATH]/db-master/repo/archive/db/9.3-1
P00 INFO: full backup total < 2 - using oldest full backup for 9.4-2 archive retention
P00 INFO: full backup total < 2 - using oldest full backup for 9.3-1 archive retention
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
@@ -691,7 +690,6 @@ P00 INFO: full backup size = 48MB
P00 INFO: new backup label = [BACKUP-FULL-2]
P00 INFO: backup command end: completed successfully
P00 INFO: expire command begin
P00 INFO: remove archive path: [TEST_PATH]/db-master/repo/archive/db/10.0-3
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
+4 -1
View File
@@ -313,6 +313,8 @@ P00 INFO: backup command end: completed successfully
P00 INFO: expire command begin
P00 INFO: remove archive path: /archive/db/9.3-1
P00 INFO: full backup total < 2 - using oldest full backup for 9.4-2 archive retention
P00 DETAIL: tls statistics:[TLS-STATISTICS]
P00 INFO: http statistics:[HTTP-STATISTICS]
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
@@ -496,7 +498,8 @@ P00 INFO: full backup size = 48MB
P00 INFO: new backup label = [BACKUP-FULL-2]
P00 INFO: backup command end: completed successfully
P00 INFO: expire command begin
P00 INFO: remove archive path: /archive/db/10.0-3
P00 DETAIL: tls statistics:[TLS-STATISTICS]
P00 INFO: http statistics:[HTTP-STATISTICS]
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf