Re: Deficient error handling in pg_dump and pg_basebackup
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2021-11-19T10:10:46Z
Lists: pgsql-hackers
On 09.11.21 21:20, Tom Lane wrote: > Why is this different from the half-dozen > other fsync-error cases in the same file? Why, if fsync failure > here is so catastrophic, is it okay to just return a normal failure > code when tar_close doesn't even get to this point because of some > earlier error? At the very least it seems like it'd be preferable > to do the exit(1) at the caller level. > > The addition of the exit(1) seems to have been intentional in > 1e2fddfa3, so cc'ing Peter for comment. That commit addressed the behavior of fsync() failure in pg_receivewal and pg_recvlogical, which are long-running daemon processes, so this change was analogous to the server-side changes at the time. I don't know what the behavior of fsync() failure in pg_basebackup should be, so calls that are only reachable from pg_basebackup are currently being handled differently.
Commits
-
Clean up error handling in pg_basebackup's walmethods.c.
- c8b5221b5767 13.6 landed
- a414eb850dd8 11.15 landed
- 8378dad4c579 12.10 landed
- 53c4a580e4ab 14.2 landed
- 248c3a937dd0 15.0 landed
- 13799bb93866 10.20 landed
-
Handle close() failures more robustly in pg_dump and pg_basebackup.
- bbda88c3383d 13.6 landed
- 6b413b41b45f 14.2 landed
- 3cac2c8caaef 15.0 landed
- 12bf118899eb 12.10 landed
-
Add support for LZ4 compression in pg_receivewal
- babbbb595d23 15.0 cited