Go to the source code of this file.
◆ CopyMethod
◆ CopyMethod
| Enumerator |
|---|
| COPY_METHOD_CLONE | |
| COPY_METHOD_COPY | |
| COPY_METHOD_COPY_FILE_RANGE | |
| COPY_METHOD_LINK | |
Definition at line 19 of file copy_file.h.
20{
24#ifdef WIN32
26#endif
@ COPY_METHOD_COPY_FILE_RANGE
◆ copy_file()
Definition at line 52 of file copy_file.c.
55{
59
60
61
62
63
65 {
67
69 pg_fatal(
"could not open file \"%s\": %m", src);
71 pg_fatal(
"could not close file \"%s\": %m", src);
72 }
73
74#ifdef WIN32
75
76
77
78
79
80
83#endif
84
85
86 switch (copy_method)
87 {
91 break;
93
95 break;
99 break;
100#ifdef WIN32
104 break;
105#endif
109 break;
110 }
111
113 {
115 pg_log_debug(
"would copy \"%s\" to \"%s\" using strategy %s",
117 else
120 }
121 else
122 {
124 pg_log_debug(
"copying \"%s\" to \"%s\" using strategy %s",
129 else
130 pg_log_debug(
"copying \"%s\" to \"%s\" and checksumming with %s",
132
134 }
135}
char * pg_checksum_type_name(pg_checksum_type type)
static void copy_file_blocks(const char *src, const char *dst, pg_checksum_context *checksum_ctx)
static void copy_file_clone(const char *src, const char *dest, pg_checksum_context *checksum_ctx)
static void copy_file_link(const char *src, const char *dest, pg_checksum_context *checksum_ctx)
static void copy_file_by_range(const char *src, const char *dest, pg_checksum_context *checksum_ctx)
#define pg_log_debug(...)
static int fd(const char *x, int i)
References CHECKSUM_TYPE_NONE, close, copy_file_blocks(), copy_file_by_range(), copy_file_clone(), copy_file_link(), COPY_METHOD_CLONE, COPY_METHOD_COPY, COPY_METHOD_COPY_FILE_RANGE, COPY_METHOD_LINK, dry_run, fb(), fd(), PG_BINARY, pg_checksum_type_name(), pg_fatal, pg_log_debug, and pg_checksum_context::type.