PostgreSQL Source Code  git master
xlogbackup.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * xlogbackup.h
4  * Definitions for internals of base backups.
5  *
6  * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  * IDENTIFICATION
10  * src/include/access/xlogbackup.h
11  *-------------------------------------------------------------------------
12  */
13 
14 #ifndef XLOG_BACKUP_H
15 #define XLOG_BACKUP_H
16 
17 #include "access/xlogdefs.h"
18 #include "pgtime.h"
19 
20 /* Structure to hold backup state. */
21 typedef struct BackupState
22 {
23  /* Fields saved at backup start */
24  /* Backup label name one extra byte for null-termination */
25  char name[MAXPGPATH + 1];
26  XLogRecPtr startpoint; /* backup start WAL location */
27  TimeLineID starttli; /* backup start TLI */
28  XLogRecPtr checkpointloc; /* last checkpoint location */
29  pg_time_t starttime; /* backup start time */
30  bool started_in_recovery; /* backup started in recovery? */
31 
32  /* Fields saved at the end of backup */
33  XLogRecPtr stoppoint; /* backup stop WAL location */
34  TimeLineID stoptli; /* backup stop TLI */
35  pg_time_t stoptime; /* backup stop time */
37 
39  bool ishistoryfile);
40 
41 #endif /* XLOG_BACKUP_H */
#define MAXPGPATH
int64 pg_time_t
Definition: pgtime.h:23
XLogRecPtr checkpointloc
Definition: xlogbackup.h:28
pg_time_t stoptime
Definition: xlogbackup.h:35
TimeLineID starttli
Definition: xlogbackup.h:27
XLogRecPtr startpoint
Definition: xlogbackup.h:26
bool started_in_recovery
Definition: xlogbackup.h:30
TimeLineID stoptli
Definition: xlogbackup.h:34
char name[MAXPGPATH+1]
Definition: xlogbackup.h:25
XLogRecPtr stoppoint
Definition: xlogbackup.h:33
pg_time_t starttime
Definition: xlogbackup.h:29
Definition: regguts.h:318
struct BackupState BackupState
char * build_backup_content(BackupState *state, bool ishistoryfile)
Definition: xlogbackup.c:29
uint64 XLogRecPtr
Definition: xlogdefs.h:21
uint32 TimeLineID
Definition: xlogdefs.h:59