Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aimDC-0004yC-1I for pgsql-docs@arkaria.postgresql.org; Wed, 23 Mar 2016 17:04:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aimDB-0008CJ-K1 for pgsql-docs@arkaria.postgresql.org; Wed, 23 Mar 2016 17:04:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aimDB-0008CC-70 for pgsql-docs@postgresql.org; Wed, 23 Mar 2016 17:04:49 +0000 Received: from gauss.credativ.com ([93.94.130.89]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1aimD8-0005mX-5L for pgsql-docs@postgresql.org; Wed, 23 Mar 2016 17:04:48 +0000 Received: from gauss.credativ.com (localhost [127.0.0.1]) by gauss.credativ.com (Postfix) with ESMTP id 26C181450070; Wed, 23 Mar 2016 18:04:44 +0100 (CET) Received: from oort (wan3.credativ.com [94.79.138.166]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: ase@gauss.credativ.com) by gauss.credativ.com (Postfix) with ESMTPSA id 060D81450052 for ; Wed, 23 Mar 2016 18:04:43 +0100 (CET) From: Andreas Seltenreich To: pgsql-docs@postgresql.org Subject: [PATCH] Clarify semantics of restore_command exit status User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 X-Hashcash: 1:24:160323:pgsql-docs@postgresql.org::nEkP/8wlu9mvSL6F:0000000000000000000000000000000000006af9 Date: Wed, 23 Mar 2016 18:04:43 +0100 Message-ID: <87y499yvkk.fsf@oort.credativ.de> MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Hi, the documentation is not clear about which of the non-zero exit codes of a restore_command are considered FATAL and which are considered a temporary failure. I had to look at the source to find the answer. Proposed fix below. regards, Andreas diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index 9092cf8..6fa7d40 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -1114,9 +1114,9 @@ restore_command = 'cp /mnt/server/archivedir/%f %p' present in the archive; it must return nonzero when so asked. This is not an error condition. An exception is that if the command was terminated by a signal (other than SIGTERM, which is used as - part of a database server shutdown) or an error by the shell (such as - command not found), then recovery will abort and the server will not start - up. + part of a database server shutdown) or an exit status greater than 125 + (such as command not found by the shell), then recovery will abort and the + server will not start up. diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml index 26af221..66d5e62 100644 --- a/doc/src/sgml/recovery-config.sgml +++ b/doc/src/sgml/recovery-config.sgml @@ -73,8 +73,9 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows An exception is that if the command was terminated by a signal (other than SIGTERM, which is used as part of a - database server shutdown) or an error by the shell (such as command - not found), then recovery will abort and the server will not start up. + database server shutdown) or an exit status greater than 125 (such as + command not found by the shell), then recovery will abort and the + server will not start up. -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs