38#if defined(HAVE_COPYFILE) && defined(COPYFILE_CLONE_FORCE)
40 pg_fatal(
"error while cloning relation \"%s.%s\" (\"%s\" to \"%s\"): %m",
42#elif defined(__linux__) && defined(FICLONE)
47 pg_fatal(
"error while cloning relation \"%s.%s\": could not open file \"%s\": %m",
52 pg_fatal(
"error while cloning relation \"%s.%s\": could not create file \"%s\": %m",
61 pg_fatal(
"error while cloning relation \"%s.%s\" (\"%s\" to \"%s\"): %s",
87 pg_fatal(
"error while copying relation \"%s.%s\": could not open file \"%s\": %m",
92 pg_fatal(
"error while copying relation \"%s.%s\": could not create file \"%s\": %m",
96#define COPY_BUF_SIZE (50 * BLCKSZ)
106 pg_fatal(
"error while copying relation \"%s.%s\": could not read file \"%s\": %m",
118 pg_fatal(
"error while copying relation \"%s.%s\": could not write file \"%s\": %m",
132 pg_fatal(
"error while copying relation \"%s.%s\" (\"%s\" to \"%s\"): %m",
150#ifdef HAVE_COPY_FILE_RANGE
156 pg_fatal(
"error while copying relation \"%s.%s\": could not open file \"%s\": %m",
161 pg_fatal(
"error while copying relation \"%s.%s\": could not create file \"%s\": %m",
168 pg_fatal(
"error while copying relation \"%s.%s\": could not copy file range from \"%s\" to \"%s\": %m",
190 pg_fatal(
"error while creating link for relation \"%s.%s\" (\"%s\" to \"%s\"): %m",
205#if defined(HAVE_COPYFILE) && defined(COPYFILE_CLONE_FORCE)
207 pg_fatal(
"could not clone file between old and new data directories: %m");
208#elif defined(__linux__) && defined(FICLONE)
214 pg_fatal(
"could not open file \"%s\": %m",
219 pg_fatal(
"could not create file \"%s\": %m",
223 pg_fatal(
"could not clone file between old and new data directories: %m");
229 pg_fatal(
"file cloning not supported on this platform");
245#if defined(HAVE_COPY_FILE_RANGE)
251 pg_fatal(
"could not open file \"%s\": %m",
256 pg_fatal(
"could not create file \"%s\": %m",
260 pg_fatal(
"could not copy file range between old and new data directories: %m");
266 pg_fatal(
"copy_file_range not supported on this platform");
285 pg_fatal(
"could not create hard link between old and new data directories: %m\n"
286 "In link mode the old and new data directories must be on the same file system.");
288 pg_fatal(
"could not create hard link between old and new data directories: %m\n"
289 "In swap mode the old and new data directories must be on the same file system.");
291 pg_fatal(
"unrecognized transfer mode");
void * pg_malloc(size_t size)
void linkFile(const char *src, const char *dst, const char *schemaName, const char *relName)
void check_file_clone(void)
void check_hard_link(transferMode transfer_mode)
void cloneFile(const char *src, const char *dst, const char *schemaName, const char *relName)
void copyFileByRange(const char *src, const char *dst, const char *schemaName, const char *relName)
void copyFile(const char *src, const char *dst, const char *schemaName, const char *relName)
void check_copy_file_range(void)
void _dosmaperr(unsigned long)