mirror of
https://github.com/postgres/postgres.git
synced 2025-05-21 15:54:08 +03:00
When backing up from a standby server, the backup process will not automatically switch xlog segment. So we must accept a partially transferred xlog file in this case, but rename it into position anyway. In passing, merge the two callbacks for segment end and stop stream into a single callback, since their implementations were close to identical, and rename this callback to reflect that it stops streaming rather than continues it. Patch by Magnus Hagander, review by Fujii Masao
17 lines
511 B
C
17 lines
511 B
C
#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 ReceiveXlogStream(PGconn *conn,
|
|
XLogRecPtr startpos,
|
|
uint32 timeline,
|
|
char *sysidentifier,
|
|
char *basedir,
|
|
stream_stop_callback stream_stop,
|
|
int standby_message_timeout,
|
|
bool rename_partial);
|