Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef TIMELINE_H
00012 #define TIMELINE_H
00013
00014 #include "access/xlogdefs.h"
00015 #include "nodes/pg_list.h"
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 typedef struct
00026 {
00027 TimeLineID tli;
00028 XLogRecPtr begin;
00029 XLogRecPtr end;
00030 } TimeLineHistoryEntry;
00031
00032 extern List *readTimeLineHistory(TimeLineID targetTLI);
00033 extern bool existsTimeLineHistory(TimeLineID probeTLI);
00034 extern TimeLineID findNewestTimeLine(TimeLineID startTLI);
00035 extern void writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
00036 XLogRecPtr switchpoint, char *reason);
00037 extern void writeTimeLineHistoryFile(TimeLineID tli, char *content, int size);
00038 extern void restoreTimeLineHistoryFiles(TimeLineID begin, TimeLineID end);
00039 extern bool tliInHistory(TimeLineID tli, List *expectedTLIs);
00040 extern TimeLineID tliOfPointInHistory(XLogRecPtr ptr, List *history);
00041 extern XLogRecPtr tliSwitchPoint(TimeLineID tli, List *history,
00042 TimeLineID *nextTLI);
00043
00044 #endif