[check_postgres] [commit] Exit right away on FATAL errors.
check_postgres at bucardo.org
check_postgres at bucardo.org
Tue Oct 7 15:58:03 UTC 2008
Committed by Greg Sabino Mullane <greg at endpoint.com>
Exit right away on FATAL errors.
Prevents excess looping due to verify_version check, and
gives a better error for actions that were using 'failok'
---
check_postgres.pl | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/check_postgres.pl b/check_postgres.pl
index 25b9a18..85282cb 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -965,6 +965,11 @@ sub run_command {
$db->{error} =~ s/^psql: //;
$ERROR = $db->{error};
}
+
+ if ($db->{error} =~ /FATAL/) {
+ ndie "$db->{error}";
+ }
+
if (!$db->{ok} and !$arg->{failok}) {
## Check if problem is due to backend being too old for this check
--
1.5.5.4
More information about the Check_postgres
mailing list