You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-11-08 03:22:25 +03: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:
@@ -25,7 +25,7 @@ use pgBackRest::Storage::Helper;
|
||||
####################################################################################################################################
|
||||
# RegEx constants
|
||||
####################################################################################################################################
|
||||
use constant REGEX_ARCHIVE_DIR_DB_VERSION => '^[0-9]+\.[0-9]+-[0-9]+$';
|
||||
use constant REGEX_ARCHIVE_DIR_DB_VERSION => '^[0-9]+(\.[0-9]+)*-[0-9]+$';
|
||||
push @EXPORT, qw(REGEX_ARCHIVE_DIR_DB_VERSION);
|
||||
use constant REGEX_ARCHIVE_DIR_WAL => '^[0-F]{16}$';
|
||||
push @EXPORT, qw(REGEX_ARCHIVE_DIR_WAL);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user