1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-06-27 00:21:08 +02:00

Fixed an issue where WAL was not expired on PostgreSQL 10.

This was caused by a faulty regex that expected all PostgreSQL major versions to be X.X.

Reported by Adam Brusselback.
This commit is contained in:
David Steele
2017-12-18 18:51:19 -05:00
parent 3cc367185e
commit ef3ef85c33
5 changed files with 120 additions and 107 deletions

View File

@ -239,7 +239,7 @@ sub process
if ($iBackupTotal > 0)
{
my $oArchiveInfo = new pgBackRest::Archive::Info($oStorageRepo->pathGet(STORAGE_REPO_ARCHIVE), true);
my @stryListArchiveDisk = $oStorageRepo->list(
my @stryListArchiveDisk = sort {((split('-', $a))[1] + 0) cmp ((split('-', $b))[1] + 0)} $oStorageRepo->list(
STORAGE_REPO_ARCHIVE, {strExpression => REGEX_ARCHIVE_DIR_DB_VERSION, bIgnoreMissing => true});
# Make sure the current database versions match between the two files