forked from vmware-archive/pg_rewind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pg_rewind.h
46 lines (36 loc) · 1.29 KB
/
pg_rewind.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*-------------------------------------------------------------------------
*
* pg_rewind.h
*
*
* Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 2013-2015 VMware, Inc. All Rights Reserved.
*
*-------------------------------------------------------------------------
*/
#ifndef PG_REWIND_H
#define PG_REWIND_H
#include "c.h"
#include "datapagemap.h"
#include "util.h"
#include "access/timeline.h"
#include "storage/block.h"
#include "storage/relfilenode.h"
#define PG_REWIND_VERSION "0.1"
/* Configuration options */
extern char *datadir_target;
extern char *datadir_source;
extern char *connstr_source;
extern int verbose;
extern int dry_run;
/* in parsexlog.c */
extern void extractPageMap(const char *datadir, XLogRecPtr startpoint, TimeLineID tli);
extern void findLastCheckpoint(const char *datadir, XLogRecPtr searchptr, TimeLineID tli,
XLogRecPtr *lastchkptrec, TimeLineID *lastchkpttli,
XLogRecPtr *lastchkptredo);
extern XLogRecPtr readOneRecord(const char *datadir, XLogRecPtr ptr, TimeLineID tli);
/* in timeline.c */
extern TimeLineHistoryEntry *rewind_parseTimeLineHistory(char *buffer,
TimeLineID targetTLI, int *nentries);
#endif /* PG_REWIND_H */