Re: Some code cleanup for pgbench and pg_verifybackup
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Fabien COELHO <coelho@cri.ensmp.fr>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-28T14:28:13Z
Lists: pgsql-hackers
On Tue, Jul 27, 2021 at 11:18 PM Michael Paquier <michael@paquier.xyz> wrote: > I have been looking at that. Here are some findings: > - In pg_archivecleanup, CleanupPriorWALFiles() does not bother > exit()'ing with an error code. Shouldn't we worry about reporting > that correctly? It seems strange to not inform users about paths that > would be broken, as that could bloat the archives without one knowing > about it. > - In pg_basebackup.c, ReceiveTarAndUnpackCopyChunk() would not > exit() when failing to change permissions for non-WIN32. > - pg_recvlogical is missing a failure handling for fstat(), as of > 5c0de38. > - pg_verifybackup is in the wrong, as mentioned upthread. > > Thoughts? All that does not seem to enter into the category of things > worth back-patching, except for pg_verifybackup. 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. -- Robert Haas EDB: http://www.enterprisedb.com
Commits
-
Add some missing exit() calls in error paths for various binaries
- 856de3b39cf6 15.0 landed
-
Add missing exit() in pg_verifybackup when failing to find pg_waldump
- efe169c90090 13.4 landed
- 67445deb7eca 14.0 landed
- 2ad98fdf53ed 15.0 landed