Implement streaming xlog for backup tools
Magnus Hagander <magnus@hagander.net>
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.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/allfiles.sgml | modified | +1 −0 |
| doc/src/sgml/reference.sgml | modified | +1 −0 |
| doc/src/sgml/ref/pg_basebackup.sgml | modified | +53 −12 |
| doc/src/sgml/ref/pg_receivexlog.sgml | added | +270 −0 |
| src/bin/pg_basebackup/.gitignore | modified | +1 −0 |
| src/bin/pg_basebackup/Makefile | modified | +10 −5 |
| src/bin/pg_basebackup/pg_basebackup.c | modified | +390 −148 |
| src/bin/pg_basebackup/pg_receivexlog.c | added | +465 −0 |
| src/bin/pg_basebackup/receivelog.c | added | +398 −0 |
| src/bin/pg_basebackup/receivelog.h | added | +22 −0 |
| src/bin/pg_basebackup/streamutil.c | added | +165 −0 |
| src/bin/pg_basebackup/streamutil.h | added | +22 −0 |
| src/tools/msvc/Mkvcbuild.pm | modified | +7 −0 |