mirror of
https://github.com/postgres/postgres.git
synced 2026-04-11 12:06:55 -04:00
This routine has an option to bypass an error if a WAL summary file is
opened for read but is missing (missing_ok=true). However, the code
incorrectly checked for EEXIST, that matters when using O_CREAT and
O_EXCL, rather than ENOENT, for this case.
There are currently only two callers of OpenWalSummaryFile() in the
tree, and both use missing_ok=false, meaning that the check based on the
errno is currently dead code. This issue could matter for out-of-core
code or future backpatches that would like to use missing_ok set to
true.
Issue spotted while monitoring this area of the code, after
|
||
|---|---|---|
| .. | ||
| backup_manifest.c | ||
| basebackup.c | ||
| basebackup_copy.c | ||
| basebackup_gzip.c | ||
| basebackup_incremental.c | ||
| basebackup_lz4.c | ||
| basebackup_progress.c | ||
| basebackup_server.c | ||
| basebackup_sink.c | ||
| basebackup_target.c | ||
| basebackup_throttle.c | ||
| basebackup_zstd.c | ||
| Makefile | ||
| meson.build | ||
| walsummary.c | ||
| walsummaryfuncs.c | ||