PostgreSQL Source Code  git master
fetch.c File Reference
#include "postgres_fe.h"
#include <sys/stat.h>
#include <unistd.h>
#include "fetch.h"
#include "file_ops.h"
#include "filemap.h"
#include "pg_rewind.h"
Include dependency graph for fetch.c:

Go to the source code of this file.


void fetchSourceFileList (void)
void executeFileMap (void)
char * fetchFile (const char *filename, size_t *filesize)

Function Documentation

◆ executeFileMap()

void executeFileMap ( void  )

Definition at line 40 of file fetch.c.

References copy_executeFileMap(), datadir_source, filemap, and libpq_executeFileMap().

Referenced by main().

41 {
42  if (datadir_source)
44  else
46 }
filemap_t * filemap
Definition: filemap.c:23
void copy_executeFileMap(filemap_t *map)
Definition: copy_fetch.c:205
char * datadir_source
Definition: pg_rewind.c:56
void libpq_executeFileMap(filemap_t *map)
Definition: libpq_fetch.c:436

◆ fetchFile()

char* fetchFile ( const char *  filename,
size_t *  filesize 

Definition at line 54 of file fetch.c.

References datadir_source, libpqGetFile(), and slurpFile().

Referenced by getTimelineHistory(), and main().

55 {
56  if (datadir_source)
57  return slurpFile(datadir_source, filename, filesize);
58  else
59  return libpqGetFile(filename, filesize);
60 }
char * datadir_source
Definition: pg_rewind.c:56
char * libpqGetFile(const char *filename, size_t *filesize)
Definition: libpq_fetch.c:364
static char * filename
Definition: pg_dumpall.c:90
char * slurpFile(const char *datadir, const char *path, size_t *filesize)
Definition: file_ops.c:284

◆ fetchSourceFileList()

void fetchSourceFileList ( void  )

Definition at line 28 of file fetch.c.

References datadir_source, libpqProcessFileList(), process_source_file(), and traverse_datadir().

Referenced by main().

29 {
30  if (datadir_source)
32  else
34 }
void traverse_datadir(const char *datadir, process_file_callback_t callback)
Definition: copy_fetch.c:33
char * datadir_source
Definition: pg_rewind.c:56
void libpqProcessFileList(void)
Definition: libpq_fetch.c:170
void process_source_file(const char *path, file_type_t type, size_t newsize, const char *link_target)
Definition: filemap.c:157