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-2024, 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  XLogRecPtr istartpoint; /* incremental based on backup at this LSN */
32  TimeLineID istarttli; /* incremental based on backup on this TLI */
33 
34  /* Fields saved at the end of backup */
35  XLogRecPtr stoppoint; /* backup stop WAL location */
36  TimeLineID stoptli; /* backup stop TLI */
37  pg_time_t stoptime; /* backup stop time */
39 
41  bool ishistoryfile);
42 
43 #endif /* XLOG_BACKUP_H */
#define MAXPGPATH
int64 pg_time_t
Definition: pgtime.h:23
TimeLineID istarttli
Definition: xlogbackup.h:32
XLogRecPtr checkpointloc
Definition: xlogbackup.h:28
pg_time_t stoptime
Definition: xlogbackup.h:37
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:36
char name[MAXPGPATH+1]
Definition: xlogbackup.h:25
XLogRecPtr istartpoint
Definition: xlogbackup.h:31
XLogRecPtr stoppoint
Definition: xlogbackup.h:35
pg_time_t starttime
Definition: xlogbackup.h:29
Definition: regguts.h:323
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