Consistently use "superuser" instead of "super user"
[pgsql.git] / src / bin / pg_basebackup / streamutil.h
blob504803b976354e659821c7fcbc24e460e8246ffd
1 /*-------------------------------------------------------------------------
3 * streamutil.h
5 * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
7 * IDENTIFICATION
8 * src/bin/pg_basebackup/streamutil.h
9 *-------------------------------------------------------------------------
12 #ifndef STREAMUTIL_H
13 #define STREAMUTIL_H
15 #include "access/xlogdefs.h"
16 #include "datatype/timestamp.h"
17 #include "libpq-fe.h"
19 extern const char *progname;
20 extern char *connection_string;
21 extern char *dbhost;
22 extern char *dbuser;
23 extern char *dbport;
24 extern char *dbname;
25 extern int dbgetpassword;
26 extern uint32 WalSegSz;
28 /* Connection kept global so we can disconnect easily */
29 extern PGconn *conn;
31 extern PGconn *GetConnection(void);
33 /* Replication commands */
34 extern bool CreateReplicationSlot(PGconn *conn, const char *slot_name,
35 const char *plugin, bool is_temporary,
36 bool is_physical, bool reserve_wal,
37 bool slot_exists_ok, bool two_phase);
38 extern bool DropReplicationSlot(PGconn *conn, const char *slot_name);
39 extern bool RunIdentifySystem(PGconn *conn, char **sysid,
40 TimeLineID *starttli,
41 XLogRecPtr *startpos,
42 char **db_name);
43 extern bool RetrieveWalSegSize(PGconn *conn);
44 extern TimestampTz feGetCurrentTimestamp(void);
45 extern void feTimestampDifference(TimestampTz start_time, TimestampTz stop_time,
46 long *secs, int *microsecs);
48 extern bool feTimestampDifferenceExceeds(TimestampTz start_time, TimestampTz stop_time,
49 int msec);
50 extern void fe_sendint64(int64 i, char *buf);
51 extern int64 fe_recvint64(char *buf);
53 #endif /* STREAMUTIL_H */