From: Greg Sabino Mullane Date: Fri, 3 Oct 2008 14:53:44 +0000 (-0400) Subject: Loosen up txn_time regex a little X-Git-Tag: 2.9.0~238 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=7ee9ce1a9aad5dbdef6e3ef98c49f360c34dc15e;p=check_postgres.git Loosen up txn_time regex a little --- diff --git a/check_postgres.pl b/check_postgres.pl index 88f382cbe..8a03c1f2f 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -2890,7 +2890,7 @@ sub check_txn_time { $SQL = q{SELECT datname, max(COALESCE(ROUND(EXTRACT(epoch FROM now()-xact_start)),0)) }. qq{FROM pg_stat_activity WHERE xact_start IS NOT NULL $USERWHERECLAUSE GROUP BY 1}; - my $info = run_command($SQL, { regex => qr[\s*.+?\s+\|\s+\d+], emptyok => 1 } ); + my $info = run_command($SQL, { regex => qr[\s+\|\s+\d+], emptyok => 1 } ); my $found = 0; for $db (@{$info->{db}}) {