Re: Some code cleanup for pgbench and pg_verifybackup

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>, Fabien COELHO <coelho@cri.ensmp.fr>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-29T07:16:59Z
Lists: pgsql-hackers
On Wed, Jul 28, 2021 at 10:28:13AM -0400, Robert Haas wrote:
> I think all of these are reasonable fixes. In the case of
> pg_basebackup, a chmod() failure doesn't necessarily oblige us to give
> up and exit; we could presumably still write the data. But it may be
> best to give up and exit. The other cases appear to be clear bugs.

Yeah, there are advantages in both positions, still it is more natural
to me to not ignore this kind of failures.  Note the inconsistency
with initdb for example.  So, done.
--
Michael

Commits

  1. Add some missing exit() calls in error paths for various binaries

  2. Add missing exit() in pg_verifybackup when failing to find pg_waldump