You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-09-16 09:06:18 +02:00
Add lz4 compression support.
LZ4 compresses data faster than gzip but at a lower ratio. This can be a good tradeoff in certain scenarios. Note that setting compress-type=lz4 will make new backups and archive incompatible (unrestorable) with prior versions of pgBackRest.
This commit is contained in:
@@ -48,6 +48,8 @@ use constant VMDEF_LCOV_VERSION => 'lcov-ver
|
||||
push @EXPORT, qw(VMDEF_LCOV_VERSION);
|
||||
use constant VMDEF_WITH_BACKTRACE => 'with-backtrace';
|
||||
push @EXPORT, qw(VMDEF_WITH_BACKTRACE);
|
||||
use constant VMDEF_WITH_LZ4 => 'with-lz4';
|
||||
push @EXPORT, qw(VMDEF_WITH_LZ4);
|
||||
|
||||
####################################################################################################################################
|
||||
# Valid OS base List
|
||||
@@ -302,6 +304,7 @@ my $oyVm =
|
||||
&VM_IMAGE => 'i386/ubuntu:12.04',
|
||||
&VM_ARCH => VM_ARCH_I386,
|
||||
&VMDEF_PGSQL_BIN => '/usr/lib/postgresql/{[version]}/bin',
|
||||
&VMDEF_WITH_LZ4 => false,
|
||||
|
||||
&VM_DB =>
|
||||
[
|
||||
@@ -591,6 +594,18 @@ sub vmWithBackTrace
|
||||
|
||||
push @EXPORT, qw(vmWithBackTrace);
|
||||
|
||||
####################################################################################################################################
|
||||
# Does the VM support liblz4?
|
||||
####################################################################################################################################
|
||||
sub vmWithLz4
|
||||
{
|
||||
my $strVm = shift;
|
||||
|
||||
return (defined($oyVm->{$strVm}{&VMDEF_WITH_LZ4}) ? $oyVm->{$strVm}{&VMDEF_WITH_LZ4} : true);
|
||||
}
|
||||
|
||||
push @EXPORT, qw(vmWithLz4);
|
||||
|
||||
####################################################################################################################################
|
||||
# Will integration tests be run in debug mode?
|
||||
####################################################################################################################################
|
||||
|
Reference in New Issue
Block a user