On 23.08.26 13:54, 达劳里亚斯 wrote:
> Here is a patch for option (4): do not define HAVE_COPY_FILE_RANGE
> when building against Linux kernel headers older than 5.3.
This approach is not correct. You don't know whether the kernel you are
running against is the one you built against. Most likely it is not.
I think a possible correct approach would be to somehow do this check in
the pg_upgrade --check phase.
But maybe nothing needs to be done. You get a clean error return if
what you are doing is not supported by copy_file_range(), so that seems ok?