PostgreSQL Source Code: src/include/backup/backup_manifest.h Source File

PostgreSQL Source Code git master
backup_manifest.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * backup_manifest.h
4 * Routines for generating a backup manifest.
5 *
6 * Portions Copyright (c) 2010-2025, PostgreSQL Global Development Group
7 *
8 * src/include/backup/backup_manifest.h
9 *
10 *-------------------------------------------------------------------------
11 */
12#ifndef BACKUP_MANIFEST_H
13#define BACKUP_MANIFEST_H
14
15#include "backup/basebackup_sink.h"
16#include "common/checksum_helper.h"
17#include "pgtime.h"
18#include "storage/buffile.h"
19
20 typedef enum manifest_option
21{
22 MANIFEST_OPTION_YES,
23 MANIFEST_OPTION_NO,
24 MANIFEST_OPTION_FORCE_ENCODE,
25 } backup_manifest_option;
26
27 typedef struct backup_manifest_info
28{
29 BufFile *buffile;
30 pg_checksum_type checksum_type;
31 pg_cryptohash_ctx *manifest_ctx;
32 uint64 manifest_size;
33 bool force_encode;
34 bool first_file;
35 bool still_checksumming;
36 } backup_manifest_info;
37
38extern void InitializeBackupManifest(backup_manifest_info *manifest,
39 backup_manifest_option want_manifest,
40 pg_checksum_type manifest_checksum_type);
41extern void AddFileToBackupManifest(backup_manifest_info *manifest,
42 Oid spcoid,
43 const char *pathname, size_t size,
44 pg_time_t mtime,
45 pg_checksum_context *checksum_ctx);
46extern void AddWALInfoToBackupManifest(backup_manifest_info *manifest,
47 XLogRecPtr startptr,
48 TimeLineID starttli, XLogRecPtr endptr,
49 TimeLineID endtli);
50
51extern void SendBackupManifest(backup_manifest_info *manifest, bbsink *sink);
52extern void FreeBackupManifest(backup_manifest_info *manifest);
53
54#endif
manifest_option
@ MANIFEST_OPTION_NO
@ MANIFEST_OPTION_FORCE_ENCODE
@ MANIFEST_OPTION_YES
struct backup_manifest_info backup_manifest_info
void InitializeBackupManifest(backup_manifest_info *manifest, backup_manifest_option want_manifest, pg_checksum_type manifest_checksum_type)
void AddFileToBackupManifest(backup_manifest_info *manifest, Oid spcoid, const char *pathname, size_t size, pg_time_t mtime, pg_checksum_context *checksum_ctx)
enum manifest_option backup_manifest_option
void AddWALInfoToBackupManifest(backup_manifest_info *manifest, XLogRecPtr startptr, TimeLineID starttli, XLogRecPtr endptr, TimeLineID endtli)
void SendBackupManifest(backup_manifest_info *manifest, bbsink *sink)
void FreeBackupManifest(backup_manifest_info *manifest)
uint64_t uint64
Definition: c.h:539
pg_checksum_type
static bool manifest
Definition: pg_basebackup.c:154
int64 pg_time_t
Definition: pgtime.h:23
unsigned int Oid
Definition: postgres_ext.h:32
Definition: buffile.c:71
pg_checksum_type checksum_type
pg_cryptohash_ctx * manifest_ctx
uint64 XLogRecPtr
Definition: xlogdefs.h:21
uint32 TimeLineID
Definition: xlogdefs.h:62

AltStyle によって変換されたページ (->オリジナル) /