From: Greg Sabino Mullane Date: Tue, 7 Oct 2008 15:56:12 +0000 (-0400) Subject: Exit right away on FATAL errors. X-Git-Tag: 2.9.0~233 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=16dd7ce3a038e25b9d2a0b1155c1105f1d1f0e4c;p=check_postgres.git 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' --- 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