summaryrefslogtreecommitdiff
path: root/check_postgres.pl
diff options
context:
space:
mode:
authorGreg Sabino Mullane2010-12-28 01:12:30 +0000
committerGreg Sabino Mullane2010-12-28 01:12:30 +0000
commit356ea6bad57c02aa1d489a1d31a21ffa9f71c589 (patch)
treea00ac4733ad08961a6ed052f7ca4b9aa2ce4075b /check_postgres.pl
parentefd34da27292585f4f25ed0d27d3a73c49a712fd (diff)
Better perf output for bloat action.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-xcheck_postgres.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index 12240a654..feb729ee0 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -1065,7 +1065,7 @@ sub add_response {
$db->{host} eq '<none>' ? '' : qq{(host:$db->{host}) },
defined $db->{port} ? ($db->{port} eq $opt{defaultport} ? '' : qq{(port=$db->{port}) }) : '';
$header =~ s/\s+$//;
- my $perf = ($opt{showtime} and $db->{totaltime}) ? "time=$db->{totaltime}" : '';
+ my $perf = ($opt{showtime} and $db->{totaltime} and $opt{action} ne 'bloat') ? "time=$db->{totaltime}" : '';
if ($db->{perf}) {
$perf .= " $db->{perf}";
}
@@ -2861,7 +2861,7 @@ FROM (
## Do the table first if we haven't seen it
if (! $seenit{"$dbname.$schema.$table"}++) {
- $db->{perf} .= " $schema.$table=$wb";
+ $db->{perf} = " $schema.$table=$wb";
my $msg = msg('bloat-table', $dbname, $schema, $table, $tups, $pages, $otta, $bloat, $wb, $ws);
my $ok = 1;
my $perbloat = $bloat * 100;
@@ -2902,7 +2902,7 @@ FROM (
## Now the index, if it exists
if ($index ne '?') {
- $db->{perf} .= " $index=$iwb" if $iwb;
+ $db->{perf} = " $index=$iwb" if $iwb;
my $msg = msg('bloat-index', $dbname, $index, $irows, $ipages, $iotta, $ibloat, $iwb, $iws);
my $ok = 1;
my $iperbloat = $ibloat * 100;