diff options
author | Christoph Berg | 2016-05-31 19:33:01 +0000 |
---|---|---|
committer | Christoph Berg | 2016-05-31 19:49:43 +0000 |
commit | b6800bdb2779ac22bf6c37169dad28d9e04c5a16 (patch) | |
tree | a24c2b89e3e626ad2fd67895c2c8d262ea5330c3 /check_postgres.pl | |
parent | 89fce2fc8c41c97560928ef2b22cd60a40320f5b (diff) |
Keep using pg_relation_size on 8.4 and earlier
pg_indexes_size doesn't exist either on 8.4, but that action is new, so
let's not care for now.
Also fix t/05_docs.t for the newly added actions.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 01fcdfcf8..77aa39ae7 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -6321,7 +6321,10 @@ WHERE relkind IN (%2$s) $SQL .= $USERWHERECLAUSE; } - my $info = run_command($SQL, {emptyok => 1}); + my $SQL8 = $SQL; + $SQL8 =~ s/pg_table_size/pg_relation_size/g; # 8.4 and earlier + + my $info = run_command($SQL, {emptyok => 1, version => [ "<9.0 $SQL8" ] }); my $found = 0; for $db (@{$info->{db}}) { @@ -10157,8 +10160,8 @@ Items not specifically attributed are by GSM (Greg Sabino Mullane). =item B<Version 2.22.1> Released ???? - Change table_size to use pg_table_size(), i.e. to include the TOAST table - size in the numbers reported. Add new actions indexes_size and + Change table_size to use pg_table_size() on 9.0+, i.e. include the TOAST + table size in the numbers reported. Add new actions indexes_size and total_relation_size, using the respective pg_indexes_size() and pg_total_relation_size() functions. All size checks will now also check materialized views where applicable. |