PostgreSQL Source Code git master
|
#include "postgres_fe.h"
#include <unistd.h>
#include "access/xlogdefs.h"
#include "backup_label.h"
#include "common/file_perm.h"
#include "common/logging.h"
#include "write_manifest.h"
Go to the source code of this file.
Functions | |
static int | get_eol_offset (StringInfo buf) |
static bool | line_starts_with (char *s, char *e, char *match, char **sout) |
static bool | parse_lsn (char *s, char *e, XLogRecPtr *lsn, char **c) |
static bool | parse_tli (char *s, char *e, TimeLineID *tli) |
void | parse_backup_label (char *filename, StringInfo buf, TimeLineID *start_tli, XLogRecPtr *start_lsn, TimeLineID *previous_tli, XLogRecPtr *previous_lsn) |
void | write_backup_label (char *output_directory, StringInfo buf, pg_checksum_type checksum_type, manifest_writer *mwriter) |
|
static |
Definition at line 201 of file backup_label.c.
Referenced by parse_backup_label(), and write_backup_label().
|
static |
Definition at line 224 of file backup_label.c.
Referenced by parse_backup_label(), and write_backup_label().
void parse_backup_label | ( | char * | filename, |
StringInfo | buf, | ||
TimeLineID * | start_tli, | ||
XLogRecPtr * | start_lsn, | ||
TimeLineID * | previous_tli, | ||
XLogRecPtr * | previous_lsn | ||
) |
Definition at line 45 of file backup_label.c.
References buf, filename, get_eol_offset(), InvalidXLogRecPtr, line_starts_with(), parse_lsn(), parse_tli(), and pg_fatal.
Referenced by check_backup_label_files().
|
static |
Definition at line 241 of file backup_label.c.
References success.
Referenced by parse_backup_label().
|
static |
Definition at line 269 of file backup_label.c.
References success.
Referenced by parse_backup_label().
void write_backup_label | ( | char * | output_directory, |
StringInfo | buf, | ||
pg_checksum_type | checksum_type, | ||
manifest_writer * | mwriter | ||
) |
Definition at line 127 of file backup_label.c.
References add_file_to_manifest(), buf, close, get_eol_offset(), line_starts_with(), MAXPGPATH, output_filename, PG_BINARY, pg_checksum_final(), pg_checksum_init(), PG_CHECKSUM_MAX_LENGTH, pg_checksum_update(), pg_fatal, pg_file_create_mode, snprintf, stat::st_mtime, stat::st_size, stat, and write.
Referenced by main().