summaryrefslogtreecommitdiffstats
path: root/src/bin/pg_rewind/pg_rewind.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:17:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:17:33 +0000
commit5e45211a64149b3c659b90ff2de6fa982a5a93ed (patch)
tree739caf8c461053357daa9f162bef34516c7bf452 /src/bin/pg_rewind/pg_rewind.h
parentInitial commit. (diff)
downloadpostgresql-15-5e45211a64149b3c659b90ff2de6fa982a5a93ed.tar.xz
postgresql-15-5e45211a64149b3c659b90ff2de6fa982a5a93ed.zip
Adding upstream version 15.5.upstream/15.5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/bin/pg_rewind/pg_rewind.h')
-rw-r--r--src/bin/pg_rewind/pg_rewind.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/bin/pg_rewind/pg_rewind.h b/src/bin/pg_rewind/pg_rewind.h
new file mode 100644
index 0000000..393182f
--- /dev/null
+++ b/src/bin/pg_rewind/pg_rewind.h
@@ -0,0 +1,56 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_rewind.h
+ *
+ *
+ * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef PG_REWIND_H
+#define PG_REWIND_H
+
+#include "access/timeline.h"
+#include "common/logging.h"
+#include "datapagemap.h"
+#include "libpq-fe.h"
+#include "storage/block.h"
+#include "storage/relfilenode.h"
+
+/* Configuration options */
+extern char *datadir_target;
+extern bool showprogress;
+extern bool dry_run;
+extern bool do_sync;
+extern int WalSegSz;
+
+/* Target history */
+extern TimeLineHistoryEntry *targetHistory;
+extern int targetNentries;
+
+/* Progress counters */
+extern uint64 fetch_size;
+extern uint64 fetch_done;
+
+/* in parsexlog.c */
+extern void extractPageMap(const char *datadir, XLogRecPtr startpoint,
+ int tliIndex, XLogRecPtr endpoint,
+ const char *restoreCommand);
+extern void findLastCheckpoint(const char *datadir, XLogRecPtr searchptr,
+ int tliIndex,
+ XLogRecPtr *lastchkptrec, TimeLineID *lastchkpttli,
+ XLogRecPtr *lastchkptredo,
+ const char *restoreCommand);
+extern XLogRecPtr readOneRecord(const char *datadir, XLogRecPtr ptr,
+ int tliIndex, const char *restoreCommand);
+
+/* in pg_rewind.c */
+extern void progress_report(bool finished);
+
+/* in timeline.c */
+extern TimeLineHistoryEntry *rewind_parseTimeLineHistory(char *buffer,
+ TimeLineID targetTLI,
+ int *nentries);
+
+#endif /* PG_REWIND_H */