[PATCH] Clarify semantics of restore_command exit status

From: Andreas Seltenreich <andreas(dot)seltenreich(at)credativ(dot)de>
To: pgsql-docs(at)postgresql(dot)org
Subject: [PATCH] Clarify semantics of restore_command exit status
Date: 2016-03-23 17:04:43
Message-ID: 87y499yvkk.fsf@oort.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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 <systemitem>SIGTERM</systemitem>, 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.
</para>

<para>
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
</programlisting>
An exception is that if the command was terminated by a signal (other
than <systemitem>SIGTERM</systemitem>, 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.
</para>
</listitem>
</varlistentry>

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Mark Clark 2016-04-06 17:05:40 FW: [webmaster] Possible error in documentation for EXTRACT
Previous Message Tom Lane 2016-03-21 18:18:21 Re: Wrong entry on 9.5 release notes