1 /*-------------------------------------------------------------------------
6 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 *-------------------------------------------------------------------------
14 #include "access/timeline.h"
15 #include "common/logging.h"
16 #include "common/file_utils.h"
18 /* Configuration options */
19 extern char *datadir_target
;
20 extern bool showprogress
;
24 extern DataDirSyncMethod sync_method
;
27 extern TimeLineHistoryEntry
*targetHistory
;
28 extern int targetNentries
;
30 /* Progress counters */
31 extern uint64 fetch_size
;
32 extern uint64 fetch_done
;
35 extern void extractPageMap(const char *datadir
, XLogRecPtr startpoint
,
36 int tliIndex
, XLogRecPtr endpoint
,
37 const char *restoreCommand
);
38 extern void findLastCheckpoint(const char *datadir
, XLogRecPtr forkptr
,
40 XLogRecPtr
*lastchkptrec
, TimeLineID
*lastchkpttli
,
41 XLogRecPtr
*lastchkptredo
,
42 const char *restoreCommand
);
43 extern XLogRecPtr
readOneRecord(const char *datadir
, XLogRecPtr ptr
,
44 int tliIndex
, const char *restoreCommand
);
47 extern void progress_report(bool finished
);
50 extern TimeLineHistoryEntry
*rewind_parseTimeLineHistory(char *buffer
,
54 #endif /* PG_REWIND_H */