[check_postgres] [commit] Testing tweaks.

check_postgres at bucardo.org check_postgres at bucardo.org
Fri May 1 20:57:24 UTC 2009


Committed by Greg Sabino Mullane <greg at endpoint.com>

Testing tweaks.

---
 t/CP_Testing.pm |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/t/CP_Testing.pm b/t/CP_Testing.pm
index 2793cdb..1e09db3 100644
--- a/t/CP_Testing.pm
+++ b/t/CP_Testing.pm
@@ -88,8 +88,6 @@ sub test_database_handle {
 		print $cfh qq{listen_addresses = ''\n};
 		print $cfh qq{max_connections = 10\n};
 		print $cfh qq{max_fsm_pages = 99999\n};
-		print $cfh qq{stats_block_level = on\n};
-		print $cfh qq{stats_row_level = on\n};
 
 		## Grab the version for finicky items
 		if (qx{$initdb --version} !~ /(\d+)\.(\d+)/) {
@@ -97,15 +95,23 @@ sub test_database_handle {
 		}
 		my ($maj,$min) = ($1,$2);
 
+		## <= 8.0
 		if ($maj < 8 or ($maj==8 and $min <= 1)) {
 			print $cfh qq{stats_command_string = on\n};
 		}
 
+		## ## >= 8.1
 		if ($maj > 8 or ($maj==8 and $min >= 1)) {
 			print $cfh qq{autovacuum = off\n};
 			print $cfh qq{max_prepared_transactions = 5\n};
 		}
 
+		## ## <= 8.2
+		if ($maj < 8 or ($maj==8 and $min <= 2)) {
+			print $cfh qq{stats_block_level = on\n};
+			print $cfh qq{stats_row_level = on\n};
+		}
+
 		print $cfh "\n";
 		close $cfh or die qq{Could not close "$cfile": $!\n};
 
-- 
1.6.0.5



More information about the Check_postgres mailing list