On friday, 25 jul. 2025 à 09:35, Jean-Christophe Arnu <jca...@gmail.com> wrote :
> On fri. 25 jul. 2025, 00:01, Jacob Champion < > jacob.champ...@enterprisedb.com> wrote : > > Here are the places where I think the details should be added : > - GUC documentation [1] > - Backup and Restore [2] > > The other mention of restore_command does not involve (or require) return > code details. > If there are no objections, I'll start writing a patch proposal on Monday. > > > [1] > https://www.postgresql.org/docs/18/runtime-config-wal.html#GUC-RESTORE-COMMAND > : file doc/src/sgml/config.sgml > [2] > https://www.postgresql.org/docs/16/continuous-archiving.html#BACKUP-PITR-RECOVERY > file: doc/src/sgml/backup.sgml > Here's a first version of this tiny doc patch. Hope this is clear enough. -- Jean-Christophe Arnu
From 961bb382763e8523e79ac23ad081bc44dfab63b9 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Arnu <jc.a...@loxodata.com> Date: Mon, 28 Jul 2025 09:49:17 +0200 Subject: [PATCH v1] add details on restore-command return code >= 128 Documentation does not mention restore_command returns codes including 128 and above. If such a code is returned, the server is shut down. --- doc/src/sgml/backup.sgml | 3 ++- doc/src/sgml/config.sgml | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index 5f7489afbd1..caaade3d0e3 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -1310,7 +1310,8 @@ restore_command = 'cp /mnt/server/archivedir/%f %p' 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. + up. However, the server will also not start if the command returns a code + superior or equal to 127. </para> <para> diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 20ccb2d6b54..548bbb33ab0 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -4058,6 +4058,8 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows 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. + However, the server will also not start if the command returns a code + of 128 and above. </para> <para> -- 2.39.5