Re: restore_command return code behaviour - Mailing list pgsql-hackers

From Jean-Christophe Arnu
Subject Re: restore_command return code behaviour
Date
Msg-id CAHZmTm2zvMOd6fvP1RzY9k7SEQA2i_q2-_UD=ervw6Zvsb+vgg@mail.gmail.com
Whole thread Raw
In response to Re: restore_command return code behaviour  (Jehan-Guillaume de Rorthais <jgdr@dalibo.com>)
Responses Re: restore_command return code behaviour
List pgsql-hackers
Hi Jehan-Guillaume,

Le lun. 28 juil. 2025 à 12:32, Jehan-Guillaume de Rorthais <jgdr@dalibo.com> a écrit :
       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
  +    of 128 and above.

It seems redundant with the explanation in this paragraph when you know that a
code greater than 125 is returned on shell error or signal.

You're right.
 
As I'm sure you already know, this behavior is documented on the
archive_command side using these words:
[...]
So I assume we could keep the same documentation style for the restore_command
side:

«
  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 **with an exit status greater than 125** (such as command not
  found), then recovery will abort and the server will not start up.
»

What do you think?

You're also right. That's more consistent and easier to read.
Thank you for pointing this out.


--
Jean-Christophe Arnu
Attachment

pgsql-hackers by date:

Previous
From: Frédéric Yhuel
Date:
Subject: Re: vacuumdb changes for stats import/export
Next
From: Robert Haas
Date:
Subject: Re: Better HINT message for "unexpected data beyond EOF"