PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pg_rewind.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_rewind.h
4  *
5  *
6  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  *-------------------------------------------------------------------------
10  */
11 #ifndef PG_REWIND_H
12 #define PG_REWIND_H
13 
14 #include "c.h"
15 
16 #include "datapagemap.h"
17 
18 #include "access/timeline.h"
19 #include "storage/block.h"
20 #include "storage/relfilenode.h"
21 
22 /* Configuration options */
23 extern char *datadir_target;
24 extern char *datadir_source;
25 extern char *connstr_source;
26 extern bool debug;
27 extern bool showprogress;
28 extern bool dry_run;
29 
30 /* Target history */
32 extern int targetNentries;
33 
34 /* in parsexlog.c */
35 extern void extractPageMap(const char *datadir, XLogRecPtr startpoint,
36  int tliIndex, XLogRecPtr endpoint);
37 extern void findLastCheckpoint(const char *datadir, XLogRecPtr searchptr,
38  int tliIndex,
39  XLogRecPtr *lastchkptrec, TimeLineID *lastchkpttli,
40  XLogRecPtr *lastchkptredo);
41 extern XLogRecPtr readOneRecord(const char *datadir, XLogRecPtr ptr,
42  int tliIndex);
43 
44 /* in timeline.c */
46  TimeLineID targetTLI, int *nentries);
47 
48 #endif /* PG_REWIND_H */
char * datadir_source
Definition: pg_rewind.c:50
uint32 TimeLineID
Definition: xlogdefs.h:45
char * connstr_source
Definition: pg_rewind.c:51
int targetNentries
Definition: pg_rewind.c:59
XLogRecPtr readOneRecord(const char *datadir, XLogRecPtr ptr, int tliIndex)
Definition: parsexlog.c:115
void findLastCheckpoint(const char *datadir, XLogRecPtr searchptr, int tliIndex, XLogRecPtr *lastchkptrec, TimeLineID *lastchkpttli, XLogRecPtr *lastchkptredo)
Definition: parsexlog.c:155
char * datadir_target
Definition: pg_rewind.c:49
char * datadir
bool showprogress
Definition: pg_rewind.c:54
bool debug
Definition: pg_standby.c:46
uint64 XLogRecPtr
Definition: xlogdefs.h:21
TimeLineHistoryEntry * targetHistory
Definition: pg_rewind.c:58
TimeLineHistoryEntry * rewind_parseTimeLineHistory(char *buffer, TimeLineID targetTLI, int *nentries)
Definition: timeline.c:30
bool dry_run
Definition: pg_rewind.c:55
void extractPageMap(const char *datadir, XLogRecPtr startpoint, int tliIndex, XLogRecPtr endpoint)
Definition: parsexlog.c:62