Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit079d94a

Browse files
committed
Check HAVE_COPY_FILE_RANGE before calling copy_file_range
Fix a mistake inac81101 - write_reconstructed_file() calledcopy_file_range() without properly checking HAVE_COPY_FILE_RANGE.Reported by several macOS machines. Also reported by cfbot, but I missedthat issue before commit.
1 parentac81101 commit079d94a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/bin/pg_combinebackup/reconstruct.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ write_reconstructed_file(char *input_filename,
672672
}
673673
else/* use copy_file_range */
674674
{
675+
#if defined(HAVE_COPY_FILE_RANGE)
675676
/* copy_file_range modifies the offset, so use a local copy */
676677
off_toff=offsetmap[i];
677678
size_tnwritten=0;
@@ -706,6 +707,9 @@ write_reconstructed_file(char *input_filename,
706707
if (pg_checksum_update(checksum_ctx,buffer,BLCKSZ)<0)
707708
pg_fatal("could not update checksum of file \"%s\"",
708709
output_filename);
710+
#else
711+
pg_fatal("copy_file_range not supported on this platform");
712+
#endif
709713
}
710714
}
711715

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp