aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_basebackup/streamutil.h
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2014-10-01 17:22:21 +0200
committerAndres Freund <andres@anarazel.de>2014-10-01 17:35:56 +0200
commit0c013e08cfbebd35ec982c4df15d44b521094d52 (patch)
tree448ef218b547b1eb65a55bd2b2760b39ef7014d5 /src/bin/pg_basebackup/streamutil.h
parentfdf81c9a6cf94921084e52c8d2ff903bae362620 (diff)
downloadpostgresql-0c013e08cfbebd35ec982c4df15d44b521094d52.tar.gz
postgresql-0c013e08cfbebd35ec982c4df15d44b521094d52.zip
Refactor replication connection code of various pg_basebackup utilities.
Move some more code to manage replication connection command to streamutil.c. A later patch will introduce replication slot via pg_receivexlog and this avoid duplicating relevant code between pg_receivexlog and pg_recvlogical. Author: Michael Paquier, with some editing by me.
Diffstat (limited to 'src/bin/pg_basebackup/streamutil.h')
-rw-r--r--src/bin/pg_basebackup/streamutil.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bin/pg_basebackup/streamutil.h b/src/bin/pg_basebackup/streamutil.h
index 8c6691f9c8c..ac66145c359 100644
--- a/src/bin/pg_basebackup/streamutil.h
+++ b/src/bin/pg_basebackup/streamutil.h
@@ -14,6 +14,8 @@
#include "libpq-fe.h"
+#include "access/xlogdefs.h"
+
extern const char *progname;
extern char *connection_string;
extern char *dbhost;
@@ -28,6 +30,15 @@ extern PGconn *conn;
extern PGconn *GetConnection(void);
+/* Replication commands */
+extern bool CreateReplicationSlot(PGconn *conn, const char *slot_name,
+ const char *plugin, XLogRecPtr *startpos,
+ bool is_physical);
+extern bool DropReplicationSlot(PGconn *conn, const char *slot_name);
+extern bool RunIdentifySystem(PGconn *conn, char **sysid,
+ TimeLineID *starttli,
+ XLogRecPtr *startpos,
+ char **db_name);
extern int64 feGetCurrentTimestamp(void);
extern void feTimestampDifference(int64 start_time, int64 stop_time,
long *secs, int *microsecs);