Consistently use "superuser" instead of "super user"
[pgsql.git] / src / include / access / timeline.h
blobce3586c39d7b5ddc3b90af5181614c1dec82f3c9
1 /*
2 * timeline.h
4 * Functions for reading and writing timeline history files.
6 * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * src/include/access/timeline.h
11 #ifndef TIMELINE_H
12 #define TIMELINE_H
14 #include "access/xlogdefs.h"
15 #include "nodes/pg_list.h"
18 * A list of these structs describes the timeline history of the server. Each
19 * TimeLineHistoryEntry represents a piece of WAL belonging to the history,
20 * from newest to oldest. All WAL locations between 'begin' and 'end' belong to
21 * the timeline represented by the entry. Together the 'begin' and 'end'
22 * pointers of all the entries form a contiguous line from beginning of time
23 * to infinity.
25 typedef struct
27 TimeLineID tli;
28 XLogRecPtr begin; /* inclusive */
29 XLogRecPtr end; /* exclusive, InvalidXLogRecPtr means infinity */
30 } TimeLineHistoryEntry;
32 extern List *readTimeLineHistory(TimeLineID targetTLI);
33 extern bool existsTimeLineHistory(TimeLineID probeTLI);
34 extern TimeLineID findNewestTimeLine(TimeLineID startTLI);
35 extern void writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
36 XLogRecPtr switchpoint, char *reason);
37 extern void writeTimeLineHistoryFile(TimeLineID tli, char *content, int size);
38 extern void restoreTimeLineHistoryFiles(TimeLineID begin, TimeLineID end);
39 extern bool tliInHistory(TimeLineID tli, List *expectedTLEs);
40 extern TimeLineID tliOfPointInHistory(XLogRecPtr ptr, List *history);
41 extern XLogRecPtr tliSwitchPoint(TimeLineID tli, List *history,
42 TimeLineID *nextTLI);
44 #endif /* TIMELINE_H */