diff --git a/doc/src/sgml/ref/pg_amcheck.sgml b/doc/src/sgml/ref/pg_amcheck.sgml
index ef2bdfd19ae..7ad7889677e 100644
--- a/doc/src/sgml/ref/pg_amcheck.sgml
+++ b/doc/src/sgml/ref/pg_amcheck.sgml
@@ -68,6 +68,13 @@ PostgreSQL documentation
    <replaceable>dbname</replaceable> can also be a
    <link linkend="libpq-connstring">connection string</link>.
   </para>
+
+  <para>
+   If <application>pg_amcheck</application> encounters a problem, the program
+   return value will be <literal>2</literal>, if there is a problem with the
+   parameters passed to the program the return value will be
+   <literal>1</literal>.
+  </para>
  </refsect1>
 
  <refsect1>
diff --git a/doc/src/sgml/ref/pg_verifybackup.sgml b/doc/src/sgml/ref/pg_verifybackup.sgml
index 61c12975e4a..aa979e56bfb 100644
--- a/doc/src/sgml/ref/pg_verifybackup.sgml
+++ b/doc/src/sgml/ref/pg_verifybackup.sgml
@@ -120,6 +120,13 @@ PostgreSQL documentation
    In contrast, the data file integrity checks should work with any version
    of the server that generates a <literal>backup_manifest</literal> file.
   </para>
+
+  <para>
+   If <literal>pg_verifybackup</literal> encounters a problem with the backup,
+   the program return value will be <literal>2</literal>, if there is a problem
+   with the parameters passed to the program the return value will be
+   <literal>1</literal>.
+  </para>
  </refsect1>
 
  <refsect1>
diff --git a/src/bin/pg_verifybackup/pg_verifybackup.c b/src/bin/pg_verifybackup/pg_verifybackup.c
index c9b24df7c05..0bc967268cb 100644
--- a/src/bin/pg_verifybackup/pg_verifybackup.c
+++ b/src/bin/pg_verifybackup/pg_verifybackup.c
@@ -514,7 +514,7 @@ report_manifest_error(JsonManifestParseContext *context, const char *fmt,...)
 	pg_log_generic_v(PG_LOG_ERROR, PG_LOG_PRIMARY, gettext(fmt), ap);
 	va_end(ap);
 
-	exit(1);
+	exit(2);
 }
 
 /*
@@ -1238,7 +1238,7 @@ report_backup_error(verifier_context *context, const char *restrict fmt,...)
 
 	context->saw_any_error = true;
 	if (context->exit_on_error)
-		exit(1);
+		exit(2);
 }
 
 /*
@@ -1253,7 +1253,7 @@ report_fatal_error(const char *restrict fmt,...)
 	pg_log_generic_v(PG_LOG_ERROR, PG_LOG_PRIMARY, gettext(fmt), ap);
 	va_end(ap);
 
-	exit(1);
+	exit(2);
 }
 
 /*
