diff options
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index c8958cfd0..dac2d6a5a 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -2547,7 +2547,9 @@ sub validate_size_or_percent_with_oper { } ## end of validate_size_or_percent_with_oper + sub validate_integer_for_time { + my $arg = shift || {}; ndie qq{validate_integer_for_time must be called with a hashref\n} unless ref $arg eq 'HASH'; @@ -2579,9 +2581,10 @@ sub validate_integer_for_time { if ($val =~ /^[-+]\d+$/) { ndie msg('range-int', $level) if $val !~ /^[-+]?\d+$/; push @ret, int $val, undef; - } else { + } + else { # Assume time for backwards compatibility. - push @ret, undef, size_in_seconds($val, $level); + push @ret, '', size_in_seconds($val, $level); } } } @@ -2591,8 +2594,10 @@ sub validate_integer_for_time { } return @ret; + } ## end of validate_integer_for_time + sub check_autovac_freeze { ## Check how close all databases are to autovacuum_freeze_max_age |