Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit95e3d50

Browse files
committed
doc: Refine documentation about recovery command exist status
Add more documentation about how different exit codes and signals arehandled in each case.Reviewed-by: Peter Geoghegan <pg@heroku.com>
1 parentfef88b3 commit95e3d50

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

‎doc/src/sgml/backup.sgml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,9 +1084,17 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
10841084

10851085
<para>
10861086
It is important that the command return nonzero exit status on failure.
1087-
The command <emphasis>will</> be called requesting files that are not present
1088-
in the archive; it must return nonzero when so asked. This is not an
1089-
error condition. Not all of the requested files will be WAL segment
1087+
The command <emphasis>will</> be called requesting files that are not
1088+
present in the archive; it must return nonzero when so asked. This is not
1089+
an error condition. An exception is that if the command was terminated by
1090+
a signal (other than <systemitem>SIGTERM</systemitem>, which is used as
1091+
part of a database server shutdown) or an error by the shell (such as
1092+
command not found), then recovery will abort and the server will not start
1093+
up.
1094+
</para>
1095+
1096+
<para>
1097+
Not all of the requested files will be WAL segment
10901098
files; you should also expect requests for files with a suffix of
10911099
<literal>.backup</> or <literal>.history</>. Also be aware that
10921100
the base name of the <literal>%p</> path will be different from

‎doc/src/sgml/recovery-config.sgml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@
7070
restore_command = 'cp /mnt/server/archivedir/%f "%p"'
7171
restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
7272
</programlisting>
73+
An exception is that if the command was terminated by a signal (other
74+
than <systemitem>SIGTERM</systemitem>, which is used as part of a
75+
database server shutdown) or an error by the shell (such as command
76+
not found), then recovery will abort and the server will not start up.
7377
</para>
7478
</listitem>
7579
</varlistentry>
@@ -106,8 +110,10 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
106110
command.
107111
</para>
108112
<para>
109-
If the command returns a non-zero exit status then a WARNING log
110-
message will be written.
113+
If the command returns a nonzero exit status then a warning log
114+
message will be written. An exception is that if the command was
115+
terminated by a signal or an error by the shell (such as command not
116+
found), a fatal error will be raised.
111117
</para>
112118
</listitem>
113119
</varlistentry>
@@ -127,10 +133,11 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
127133
last valid restart point, like in <xref linkend="archive-cleanup-command">.
128134
</para>
129135
<para>
130-
If the command returns anon-zero exit status then aWARNING log
136+
If the command returns anonzero exit status then awarning log
131137
message will be written and the database will proceed to start up
132138
anyway. An exception is that if the command was terminated by a
133-
signal, the database will not proceed with startup.
139+
signal or an error by the shell (such as command not found), the
140+
database will not proceed with startup.
134141
</para>
135142
</listitem>
136143
</varlistentry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp