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 "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 
28 /* Target history */
30 extern int targetNentries;
31 
32 /* in parsexlog.c */
33 extern void extractPageMap(const char *datadir, XLogRecPtr startpoint,
34  int tliIndex, XLogRecPtr endpoint);
35 extern void findLastCheckpoint(const char *datadir, XLogRecPtr searchptr,
36  int tliIndex,
37  XLogRecPtr *lastchkptrec, TimeLineID *lastchkpttli,
38  XLogRecPtr *lastchkptredo);
39 extern XLogRecPtr readOneRecord(const char *datadir, XLogRecPtr ptr,
40  int tliIndex);
41 
42 /* in timeline.c */
44  TimeLineID targetTLI, int *nentries);
45 
46 #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
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:55
void extractPageMap(const char *datadir, XLogRecPtr startpoint, int tliIndex, XLogRecPtr endpoint)
Definition: parsexlog.c:62