Check HAVE_COPY_FILE_RANGE before calling copy_file_range

Tomas Vondra <tomas.vondra@postgresql.org>

Commit: 079d94ab3412fdeda637a24b17bde53c576b0007
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Date: 2024-04-05T17:38:20Z
Releases: 17.0
Check HAVE_COPY_FILE_RANGE before calling copy_file_range

Fix a mistake in ac8110155132 - write_reconstructed_file() called
copy_file_range() without properly checking HAVE_COPY_FILE_RANGE.

Reported by several macOS machines. Also reported by cfbot, but I missed
that issue before commit.

Files

PathChange+/−
src/bin/pg_combinebackup/reconstruct.c modified +4 −0