88 pg_fatal(
"could not open source file \"%s\": %m",
115 pg_fatal(
"size of source file \"%s\" changed concurrently: %zu bytes expected, %zu copied",
140 pg_fatal(
"could not open source file \"%s\": %m",
144 pg_fatal(
"could not seek in source file: %m");
148 while (end - begin > 0)
153 if (end - begin >
sizeof(
buf))
void * pg_malloc0(size_t size)
void traverse_datadir(const char *datadir, process_file_callback_t callback)
char * slurpFile(const char *datadir, const char *path, size_t *filesize)
void open_target_file(const char *path, bool trunc)
void write_target_range(char *buf, off_t begin, size_t size)
void(* process_file_callback_t)(const char *path, file_type_t type, size_t size, const char *link_target)
static void local_queue_fetch_file(rewind_source *source, const char *path, size_t len)
static void local_destroy(rewind_source *source)
rewind_source * init_local_source(const char *datadir)
static void local_traverse_files(rewind_source *source, process_file_callback_t callback)
static char * local_fetch_file(rewind_source *source, const char *path, size_t *filesize)
static void local_finish_fetch(rewind_source *source)
static void local_queue_fetch_range(rewind_source *source, const char *path, off_t off, size_t len)
void pfree(void *pointer)
static rewind_source * source
static char buf[DEFAULT_XLOG_SEG_SIZE]
void(* queue_fetch_file)(struct rewind_source *, const char *path, size_t len)
void(* traverse_files)(struct rewind_source *, process_file_callback_t callback)
void(* finish_fetch)(struct rewind_source *)
XLogRecPtr(* get_current_wal_insert_lsn)(struct rewind_source *)
void(* queue_fetch_range)(struct rewind_source *, const char *path, off_t offset, size_t len)
char *(* fetch_file)(struct rewind_source *, const char *path, size_t *filesize)
void(* destroy)(struct rewind_source *)
static void callback(struct sockaddr *addr, struct sockaddr *mask, void *unused)