From 16dd7ce3a038e25b9d2a0b1155c1105f1d1f0e4c Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Tue, 7 Oct 2008 11:56:12 -0400 Subject: [PATCH] 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 file changed, 5 insertions(+) diff --git a/check_postgres.pl b/check_postgres.pl index 25b9a1808..85282cb3a 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 -- 2.30.2