PostgreSQL Source Code  git master
load_manifest.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * Load data from a backup manifest into memory.
4  *
5  * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
6  * Portions Copyright (c) 1994, Regents of the University of California
7  *
8  * src/bin/pg_combinebackup/load_manifest.h
9  *
10  *-------------------------------------------------------------------------
11  */
12 #ifndef LOAD_MANIFEST_H
13 #define LOAD_MANIFEST_H
14 
15 #include "access/xlogdefs.h"
16 #include "common/checksum_helper.h"
17 
18 /*
19  * Each file described by the manifest file is parsed to produce an object
20  * like this.
21  */
22 typedef struct manifest_file
23 {
24  uint32 status; /* hash status */
25  char *pathname;
26  size_t size;
31 
32 #define SH_PREFIX manifest_files
33 #define SH_ELEMENT_TYPE manifest_file
34 #define SH_KEY_TYPE char *
35 #define SH_SCOPE extern
36 #define SH_RAW_ALLOCATOR pg_malloc0
37 #define SH_DECLARE
38 #include "lib/simplehash.h"
39 
40 /*
41  * Each WAL range described by the manifest file is parsed to produce an
42  * object like this.
43  */
44 typedef struct manifest_wal_range
45 {
52 
53 /*
54  * All the data parsed from a backup_manifest file.
55  */
56 typedef struct manifest_data
57 {
59  manifest_files_hash *files;
63 
64 extern manifest_data *load_backup_manifest(char *backup_directory);
65 extern manifest_data **load_backup_manifests(int n_backups,
66  char **backup_directories);
67 
68 #endif /* LOAD_MANIFEST_H */
unsigned int uint32
Definition: c.h:506
unsigned char uint8
Definition: c.h:504
pg_checksum_type
struct manifest_wal_range manifest_wal_range
struct manifest_file manifest_file
manifest_data ** load_backup_manifests(int n_backups, char **backup_directories)
Definition: load_manifest.c:83
manifest_data * load_backup_manifest(char *backup_directory)
struct manifest_data manifest_data
manifest_wal_range * last_wal_range
Definition: load_manifest.h:61
manifest_wal_range * first_wal_range
Definition: load_manifest.h:60
uint64 system_identifier
Definition: load_manifest.h:58
manifest_files_hash * files
Definition: load_manifest.h:59
uint8 * checksum_payload
Definition: load_manifest.h:29
pg_checksum_type checksum_type
Definition: load_manifest.h:27
XLogRecPtr end_lsn
Definition: load_manifest.h:48
struct manifest_wal_range * next
Definition: load_manifest.h:49
struct manifest_wal_range * prev
Definition: load_manifest.h:50
XLogRecPtr start_lsn
Definition: load_manifest.h:47
uint64 XLogRecPtr
Definition: xlogdefs.h:21
uint32 TimeLineID
Definition: xlogdefs.h:59