aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_basebackup/receivelog.h
blob: b38e993c1aaa8cf230c65e1dd50f19a7439402b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*-------------------------------------------------------------------------
 *
 * receivelog.h
 *
 * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
 *
 * IDENTIFICATION
 *		  src/bin/pg_basebackup/receivelog.h
 *-------------------------------------------------------------------------
 */

#ifndef RECEIVELOG_H
#define RECEIVELOG_H

#include "libpq-fe.h"

#include "access/xlogdefs.h"

/*
 * Called before trying to read more data or when a segment is
 * finished. Return true to stop streaming.
 */
typedef bool (*stream_stop_callback) (XLogRecPtr segendpos, uint32 timeline, bool segment_finished);

extern bool CheckServerVersionForStreaming(PGconn *conn);
extern bool ReceiveXlogStream(PGconn *conn,
				  XLogRecPtr startpos,
				  uint32 timeline,
				  char *sysidentifier,
				  char *basedir,
				  stream_stop_callback stream_stop,
				  int standby_message_timeout,
				  char *partial_suffix,
				  bool synchronous,
				  bool mark_done);

#endif   /* RECEIVELOG_H */