copy_file_range() conflict between pg_rewind and libc

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Subject: copy_file_range() conflict between pg_rewind and libc
Date: 2018-01-03 03:34:25
Message-ID: 20180103033425.w7jkljth3e26sduc@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Animal caiman just revived and promptly failed:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=caiman&dt=2018-01-03%2003%3A13%3A54

copy_fetch.c:159:1: error: conflicting types for ‘copy_file_range’
copy_file_range(const char *path, off_t begin, off_t end, bool trunc)
^~~~~~~~~~~~~~~
In file included from copy_fetch.c:15:0:
/usr/include/unistd.h:1110:9: note: previous declaration of ‘copy_file_range’ was here
ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
^~~~~~~~~~~~~~~

copy_file_range() is a new-ish syscall that does in-kernel copying of
data. Therefore I think we should rename pg_rewind's version to
something like rwnd_copy_file_range(). Better names welcome.

I think we need to do so in all pg_rewind containing branches, this is
going to become an actual problem once sufficiently new glibc's are
common. Currently this appears to be unreleased (caiman runs fedora
rawhide), but that's not going to continue be the case.

Greetings,

Andres Freund

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2018-01-03 03:41:35 Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)
Previous Message Peter Eisentraut 2018-01-03 03:12:07 Re: FOR EACH ROW triggers on partitioned tables