Consistently use "superuser" instead of "super user"
[pgsql.git] / src / bin / pg_basebackup / receivelog.h
blobe04333bf81d73058a65540d410708289f7dbc003
1 /*-------------------------------------------------------------------------
3 * receivelog.h
5 * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
7 * IDENTIFICATION
8 * src/bin/pg_basebackup/receivelog.h
9 *-------------------------------------------------------------------------
12 #ifndef RECEIVELOG_H
13 #define RECEIVELOG_H
15 #include "access/xlogdefs.h"
16 #include "libpq-fe.h"
17 #include "walmethods.h"
20 * Called before trying to read more data or when a segment is
21 * finished. Return true to stop streaming.
23 typedef bool (*stream_stop_callback) (XLogRecPtr segendpos, uint32 timeline, bool segment_finished);
26 * Global parameters when receiving xlog stream. For details about the individual fields,
27 * see the function comment for ReceiveXlogStream().
29 typedef struct StreamCtl
31 XLogRecPtr startpos; /* Start position for streaming */
32 TimeLineID timeline; /* Timeline to stream data from */
33 char *sysidentifier; /* Validate this system identifier and
34 * timeline */
35 int standby_message_timeout; /* Send status messages this often */
36 bool synchronous; /* Flush immediately WAL data on write */
37 bool mark_done; /* Mark segment as done in generated archive */
38 bool do_sync; /* Flush to disk to ensure consistent state of
39 * data */
41 stream_stop_callback stream_stop; /* Stop streaming when returns true */
43 pgsocket stop_socket; /* if valid, watch for input on this socket
44 * and check stream_stop() when there is any */
46 WalWriteMethod *walmethod; /* How to write the WAL */
47 char *partial_suffix; /* Suffix appended to partially received files */
48 char *replication_slot; /* Replication slot to use, or NULL */
49 } StreamCtl;
53 extern bool CheckServerVersionForStreaming(PGconn *conn);
54 extern bool ReceiveXlogStream(PGconn *conn,
55 StreamCtl *stream);
57 #endif /* RECEIVELOG_H */