$Data::Dumper::Indent = 2;
$Data::Dumper::Useqq = 1;
-our $VERSION = '1.3.0';
+our $VERSION = '1.3.1';
use vars qw/ %opt $PSQL $res $COM $SQL $db /;
relation_size => 'VERSION: 8.1',
table_size => 'VERSION: 8.1',
index_size => 'VERSION: 8.1',
- txn_idle => 'VERSION: 8.3',
+ txn_idle => 'VERSION: 8.2',
txn_time => 'VERSION: 8.3',
);
if ($opt{test}) {
type => 'time',
});
- $SQL = q{SELECT datname, max(COALESCE(ROUND(EXTRACT(epoch FROM now()-xact_start)),0)) }.
+ $SQL = q{SELECT datname, max(COALESCE(ROUND(EXTRACT(epoch FROM now()-query_start)),0)) }.
q{FROM pg_stat_activity WHERE current_query = '<IDLE> in transaction' GROUP BY 1};
my $info = run_command($SQL, { regex => qr[\s*.+?\s+\|\s+\d+], emptyok => 1 } );
=head1 VERSION
-This documents describes check_postgres.pl version 1.3.0
+This documents describes check_postgres.pl version 1.3.1
=head1 SYNOPSIS
=over 4
+=item B<Version 1.3.1>
+
+Have txn_idle use query_start, not xact_start
+
=item B<Version 1.3.0>
Add in txn_idle and txn_time actions.