summaryrefslogtreecommitdiff
path: root/src/bin/pg_rewind/pg_rewind.h
diff options
context:
space:
mode:
authorTom Lane2019-05-14 17:11:23 +0000
committerTom Lane2019-05-14 17:11:23 +0000
commit53ddefbaf8a0493d2c1fa0b18bfaba72da556985 (patch)
tree926b4b8b961310df9a32d69f9648eb21100d9ef4 /src/bin/pg_rewind/pg_rewind.h
parent7c850320d8cfa5503ecec61c2559661b924f7595 (diff)
Remove pg_rewind's private logging.h/logging.c files.
The existence of these files became rather confusing with the introduction of a widely-known logging.h header in commit cc8d41511. (Indeed, there's already some duplicative #includes here, perhaps betraying such confusion.) The only thing left in them, after that commit, is a progress-reporting function that's neither general-purpose nor tied in any way to other logging infrastructure. Hence, let's just move that function to pg_rewind.c, and get rid of the separate files. Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/bin/pg_rewind/pg_rewind.h')
-rw-r--r--src/bin/pg_rewind/pg_rewind.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bin/pg_rewind/pg_rewind.h b/src/bin/pg_rewind/pg_rewind.h
index f2cc2800aa4..9e6f9474d59 100644
--- a/src/bin/pg_rewind/pg_rewind.h
+++ b/src/bin/pg_rewind/pg_rewind.h
@@ -17,6 +17,8 @@
#include "storage/block.h"
#include "storage/relfilenode.h"
+#include "fe_utils/logging.h"
+
/* Configuration options */
extern char *datadir_target;
extern char *datadir_source;
@@ -29,6 +31,13 @@ extern int WalSegSz;
extern TimeLineHistoryEntry *targetHistory;
extern int targetNentries;
+/* Progress counters */
+extern uint64 fetch_size;
+extern uint64 fetch_done;
+
+/* logging support */
+#define pg_fatal(...) do { pg_log_fatal(__VA_ARGS__); exit(1); } while(0)
+
/* in parsexlog.c */
extern void extractPageMap(const char *datadir, XLogRecPtr startpoint,
int tliIndex, XLogRecPtr endpoint);
@@ -39,6 +48,9 @@ extern void findLastCheckpoint(const char *datadir, XLogRecPtr searchptr,
extern XLogRecPtr readOneRecord(const char *datadir, XLogRecPtr ptr,
int tliIndex);
+/* in pg_rewind.c */
+extern void progress_report(bool force);
+
/* in timeline.c */
extern TimeLineHistoryEntry *rewind_parseTimeLineHistory(char *buffer,
TimeLineID targetTLI, int *nentries);