From 233d3ccd559e0b44fc11f6fad0fb1ef716cf17dd Mon Sep 17 00:00:00 2001 From: Kiriakos Georgiou Date: Wed, 25 Jul 2018 19:22:13 -0400 Subject: [PATCH] check_txn_idle() introduced multiple '>' version ckecks to handle v10 postgres, but run_command() does not correctly implement such multiple '>' or '<' version checks. run_command() should match the highest '<' or '>' version. The modified implementation works if and only if the versions are passed in ascending order, which is the way check_txn_idle() currently passes them. --- check_postgres.pl | 2 -- 1 file changed, 2 deletions(-) diff --git a/check_postgres.pl b/check_postgres.pl index c4779c31..4f1c5cd6 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -2874,11 +2874,9 @@ sub run_command { my ($mod,$ver) = ($1||'',$2); if ($mod eq '>' and $db->{version} > $ver) { $string = $row; - last; } if ($mod eq '<' and $db->{version} < $ver) { $string = $row; - last; } if ($mod eq '' and $db->{version} eq $ver) { $string = $row;