Permalink
Browse files

Merge pull request #34 from ioguix/master

Support archiving WAL files with .partial suffix
  • Loading branch information...
2 parents 1ba530c + 230c4ce commit fdb41337d623ce38f3639f0c34a99dcdad6c594e @depesz depesz committed May 20, 2016
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/OmniPITR/Program/Archive.pm
  2. +1 −1 lib/OmniPITR/Program/Cleanup.pm
View
2 lib/OmniPITR/Program/Archive.pm
@@ -416,7 +416,7 @@ sub validate_args {
}
$self->log->fatal( 'Given segment name is not valid (%s)', $self->{ 'segment' } )
- unless basename( $self->{ 'segment' } ) =~ m{\A(?:[a-fA-F0-9]{24}(?:\.[a-fA-F0-9]{8}\.backup)?|[a-fA-F0-9]{8}\.history)\z};
+ unless basename( $self->{ 'segment' } ) =~ m{\A(?:[a-fA-F0-9]{24}(?:\.[a-fA-F0-9]{8}\.backup|\.partial)?|[a-fA-F0-9]{8}\.history)\z};
my $segment_file_name = $self->{ 'segment' };
$segment_file_name = File::Spec->catfile( $self->{ 'data-dir' }, $self->{ 'segment' } ) unless $self->{ 'segment' } =~ m{^/};
View
2 lib/OmniPITR/Program/Cleanup.pm
@@ -165,7 +165,7 @@ path), which is the default.
sub validate_args {
my $self = shift;
- $self->log->fatal( 'Given segment name is not valid (%s)', $self->{ 'segment' } ) unless $self->{ 'segment' } =~ m{\A([a-fA-F0-9]{24}(?:\.[a-fA-F0-9]{8}\.backup)?|[a-fA-F0-9]{8}\.history)\z};
+ $self->log->fatal( 'Given segment name is not valid (%s)', $self->{ 'segment' } ) unless $self->{ 'segment' } =~ m{\A(?:[a-fA-F0-9]{24}(?:\.[a-fA-F0-9]{8}\.backup|\.partial)?|[a-fA-F0-9]{8}\.history)\z};
$self->log->fatal( 'Given archive (%s) is not a directory', $self->{ 'archive' }->{ 'path' } ) unless -d $self->{ 'archive' }->{ 'path' };
$self->log->fatal( 'Given archive (%s) is not readable', $self->{ 'archive' }->{ 'path' } ) unless -r $self->{ 'archive' }->{ 'path' };

0 comments on commit fdb4133

Please sign in to comment.