Changeset 113 for trunk/omnipitr

Show
Ignore:
Timestamp:
04/09/10 23:42:24 (4 years ago)
Author:
depesz
Message:

some more debugging, logs, remove some slight bugs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/omnipitr/lib/OmniPITR/Program/Restore.pm

    r108 r113  
    5050    return unless $self->{ 'remove-unneeded' }; 
    5151 
    52     return if $self->{ 'removal-pause-trigger' } && -e $self->{ 'removal-pause-trigger' }; 
     52    if ( $self->{ 'removal-pause-trigger' } && -e $self->{ 'removal-pause-trigger' } ) { 
     53        unless ( $self->{ 'trigger-logged' } ) { 
     54            $self->{ 'trigger-logged' }++; 
     55            $self->log->log( 'Pause trigger exists (%s), NOT removing any old segments.', $self->{ 'removal-pause-trigger' } ); 
     56        } 
     57        return; 
     58    } 
    5359 
    5460    my $control_data = $self->get_control_data(); 
     
    96102    } 
    97103 
    98     my $previous_dir = gwtcwd(); 
     104    my $previous_dir = getcwd(); 
    99105    chdir $self->{ 'temp-dir' }; 
    100106 
    101107    my $full_command = $self->{ 'pre-removal-processing' } . " pg_xlog/$segment_name"; 
    102108 
    103     my $comment = 'Running pre-removal-processing command: ' . $full_command; 
     109    $comment = 'Running pre-removal-processing command: ' . $full_command; 
    104110 
    105111    $self->log->time_start( $comment ) if $self->{ 'verbose' };