mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Implement streaming xlog for backup tools
Add option for parallel streaming of the transaction log while a base backup is running, to get the logfiles before the server has removed them. Also add a tool called pg_receivexlog, which streams the transaction log into files, creating a log archive without having to wait for segments to complete, thus decreasing the window of data loss without having to waste space using archive_timeout. This works best in combination with archive_command - suggested usage docs etc coming later.
This commit is contained in:
22
src/bin/pg_basebackup/streamutil.h
Normal file
22
src/bin/pg_basebackup/streamutil.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "libpq-fe.h"
|
||||
|
||||
extern const char *progname;
|
||||
extern char *dbhost;
|
||||
extern char *dbuser;
|
||||
extern char *dbport;
|
||||
extern int dbgetpassword;
|
||||
|
||||
/* Connection kept global so we can disconnect easily */
|
||||
extern PGconn *conn;
|
||||
|
||||
#define disconnect_and_exit(code) \
|
||||
{ \
|
||||
if (conn != NULL) PQfinish(conn); \
|
||||
exit(code); \
|
||||
}
|
||||
|
||||
|
||||
char *xstrdup(const char *s);
|
||||
void *xmalloc0(int size);
|
||||
|
||||
PGconn *GetConnection(void);
|
||||
Reference in New Issue
Block a user