summaryrefslogtreecommitdiff
path: root/src/bin/pg_combinebackup/pg_combinebackup.c
diff options
context:
space:
mode:
authorTomas Vondra2024-06-30 17:02:00 +0000
committerTomas Vondra2024-06-30 18:51:18 +0000
commite99e840b82756bc6858222d97453639cef929b53 (patch)
treeb9d1dbb295898f35a55653400e4c10a45a7e0af9 /src/bin/pg_combinebackup/pg_combinebackup.c
parent917754557cc0002bb042341720a7ce18fe5b0a09 (diff)
Add headers needed by pg_combinebackup --clone
The code for file cloning existed, but was not reachable as it relied on constants from missing headers. Due to that, on Linux --clone always failed with error: file cloning not supported on this platform Fixed by including the missing headers to relevant places. Adding the headers revealed a couple compile errors in copy_file_clone(), so fix those too. Reported-by: Peter Eisentraut Discussion: https://postgr.es/m/48da4a1f-ccd9-4988-9622-24f37b1de2b4%40eisentraut.org
Diffstat (limited to 'src/bin/pg_combinebackup/pg_combinebackup.c')
-rw-r--r--src/bin/pg_combinebackup/pg_combinebackup.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bin/pg_combinebackup/pg_combinebackup.c b/src/bin/pg_combinebackup/pg_combinebackup.c
index d8e928862b2..363fae234e9 100644
--- a/src/bin/pg_combinebackup/pg_combinebackup.c
+++ b/src/bin/pg_combinebackup/pg_combinebackup.c
@@ -16,6 +16,14 @@
#include <fcntl.h>
#include <limits.h>
+#ifdef HAVE_COPYFILE_H
+#include <copyfile.h>
+#endif
+#ifdef __linux__
+#include <sys/ioctl.h>
+#include <linux/fs.h>
+#endif
+
#include "backup_label.h"
#include "common/blkreftable.h"
#include "common/checksum_helper.h"