PostgreSQL Source Code  git master
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 "datapagemap.h"
15 
16 #include "access/timeline.h"
17 #include "storage/block.h"
18 #include "storage/relfilenode.h"
19 
20 /* Configuration options */
21 extern char *datadir_target;
22 extern char *datadir_source;
23 extern char *connstr_source;
24 extern bool debug;
25 extern bool showprogress;
26 extern bool dry_run;
27 extern int WalSegSz;
28 
29 /* Target history */
31 extern int targetNentries;
32 
33 /* in parsexlog.c */
34 extern void extractPageMap(const char *datadir, XLogRecPtr startpoint,
35  int tliIndex, XLogRecPtr endpoint);
36 extern void findLastCheckpoint(const char *datadir, XLogRecPtr searchptr,
37  int tliIndex,
38  XLogRecPtr *lastchkptrec, TimeLineID *lastchkpttli,
39  XLogRecPtr *lastchkptredo);
40 extern XLogRecPtr readOneRecord(const char *datadir, XLogRecPtr ptr,
41  int tliIndex);
42 
43 /* in timeline.c */
45  TimeLineID targetTLI, int *nentries);
46 
47 #endif /* PG_REWIND_H */
char * datadir_source
Definition: pg_rewind.c:51
uint32 TimeLineID
Definition: xlogdefs.h:45
char * connstr_source
Definition: pg_rewind.c:52
int targetNentries
Definition: pg_rewind.c:60
XLogRecPtr readOneRecord(const char *datadir, XLogRecPtr ptr, int tliIndex)
Definition: parsexlog.c:116
int WalSegSz
Definition: pg_standby.c:39
void findLastCheckpoint(const char *datadir, XLogRecPtr searchptr, int tliIndex, XLogRecPtr *lastchkptrec, TimeLineID *lastchkpttli, XLogRecPtr *lastchkptredo)
Definition: parsexlog.c:157
char * datadir_target
Definition: pg_rewind.c:50
char * datadir
bool showprogress
Definition: pg_rewind.c:55
bool debug
Definition: pg_standby.c:48
uint64 XLogRecPtr
Definition: xlogdefs.h:21
TimeLineHistoryEntry * targetHistory
Definition: pg_rewind.c:59
WalTimeSample buffer[LAG_TRACKER_BUFFER_SIZE]
Definition: walsender.c:214
TimeLineHistoryEntry * rewind_parseTimeLineHistory(char *buffer, TimeLineID targetTLI, int *nentries)
Definition: timeline.c:30
bool dry_run
Definition: pg_rewind.c:56
void extractPageMap(const char *datadir, XLogRecPtr startpoint, int tliIndex, XLogRecPtr endpoint)
Definition: parsexlog.c:62