Hi Jakub, Thanks, option (4) makes sense to me. I'll prepare a patch to disable HAVE_COPY_FILE_RANGE when building against Linux kernel headers older than 5.3, covering both the Autoconf and Meson build paths.
Thanks, Johnny Jakub Wartak <[email protected]> 于2026年8月21日周五 19:01写道: > > Hi Johnny, > > On Fri, Aug 21, 2026 at 8:19 AM 达劳里亚斯 <[email protected]> wrote: > > > [..] > > On 4.19 a non-empty source makes round 1 return > 0, so round 2 always > > runs, always returns EINVAL, and we pg_fatal. > > An empty file would return 0 on round 1 and skip round 2; relation > > files are not empty. > > As per [1], the 4.19 (LTS series) was released in 2018 and went EOS on 2024 > and running that today anywhere on production would be not responsilbe > anyway, so option 4: why just not add override #undef HAVE_FILE_COPY_RANGE > when kernel is < 5.3 then? (in configure.ac and meson.build). Dunno what else > may misbehave there as nobody is going to test it combitation with that old > fs code too, but at least the tests won't complain. We use that syscall in > other tools too... > > -J. > > [1] - https://endoflife.date/linux
