From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add some missing exit() calls in error paths for various binarie
Date: Thu, 29 Jul 2021 02:44:34 +0000
Message-ID: <E1m8w2E-0001ZL-K1@gemulon.postgresql.org> (raw)
Add some missing exit() calls in error paths for various binaries
The following changes are done:
- In pg_archivecleanup, the cleanup of older WAL segments would never
fail immediately.
- In pgbench, the initialization of a thread barrier would not fail
hard.
- In pg_recvlogical, a stat() failure never got the call.
- In pg_basebackup, two chmod() reported a failure without exit()'ing
when unpacking some tar data freshly received. It may be possible to
continue writing some data even after this failure, but that could be
confusing to the user at the end.
These are arguably bugs, but they would happen for code paths where a
failure is unlikely going to happen, so no backpatch is done.
Reviewed-by: Robert Haas, Fabien Coelho
Discussion: https://postgr.es/m/YQDMdB+B68yePFeT@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/856de3b39cf6041338b286a99257c324ce647f4e
Modified Files
--------------
src/bin/pg_archivecleanup/pg_archivecleanup.c | 11 ++++++++++-
src/bin/pg_basebackup/pg_basebackup.c | 6 ++++++
src/bin/pg_basebackup/pg_recvlogical.c | 3 +++
src/bin/pgbench/pgbench.c | 3 +++
4 files changed, 22 insertions(+), 1 deletion(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Add some missing exit() calls in error paths for various binarie
In-Reply-To: <E1m8w2E-0001ZL-K1@gemulon.postgresql.org>
References: <E1m8w2E-0001ZL-K1@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox