diff options
author | Greg Sabino Mullane | 2013-05-01 01:18:37 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2013-05-01 01:18:37 +0000 |
commit | df22e6a100ca3d1e2d2d4d2152fa110fd4c109c3 (patch) | |
tree | c0b83f54fbc1d3e1aee7adbcad26de2ed3353927 | |
parent | 2d97a595b2d7f3a2b04b5c42285ee2ebcc697f27 (diff) |
Do not use pg_stats "inherited" column in bloat query, if the database is 8.4 or older.
Technically, we are not checking the target's version.
-rwxr-xr-x | check_postgres.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index e023844b8..c7c777f49 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -3605,6 +3605,10 @@ FROM ( $SQL =~ s/BLOCK_SIZE/(SELECT current_setting('block_size')::numeric) AS bs/; } + if ($psql_version <= 8.4) { + $SQL =~ s/AND s.inherited=false//; + } + my $info = run_command($SQL); if (defined $info->{db}[0] and exists $info->{db}[0]{error}) { @@ -9761,6 +9765,8 @@ Items not specifically attributed are by GSM (Greg Sabino Mullane). Compute correct 'totalwastedbytes' in the bloat query (Michael Renner) + Do not use pg_stats "inherited" column in bloat query, if the + database is 8.4 or older. (Greg Sabino Mullane, per bug 121) =item B<Version 2.20.0> March 13, 2013 |