This will write one single tar file containing all tablespaces, and
can be written to stdout.
---
src/bin/pg_basebackup/pg_basebackup.c | 282 --
1 file changed, 269 insertions(+), 13 deletions(-)
diff --git a/src/bin/pg_basebackup/pg_basebackup.c
b/src/bin/pg_bas
On Tue, Sep 29, 2015 at 11:50:37PM +0200, Andres Freund wrote:
> On 2015-09-29 14:38:11 -0700, Josh Elsasser wrote:
> > I've put my changes up as a series of relatively small commits on this
> > branch of a github fork:
> >
> > https://github.com/jre/postgres/commits/single-tar
> >
> > Comments a
This adds a simple struct and open and close functions to abstract and
isolate the zlib vs. stdio output logic and allow it to be reused.
---
src/bin/pg_basebackup/pg_basebackup.c | 300 +-
1 file changed, 154 insertions(+), 146 deletions(-)
diff --git a/src/bin/pg
After a complete tar header was buffered it would only be processed
during the next iteration of the read loop. A zero-length file such as
a directory had no data to read, so the loop would exit without ever
having processed the file.
---
src/bin/pg_basebackup/pg_basebackup.c | 238 +++
---
src/bin/pg_basebackup/pg_basebackup.c | 4 ++--
src/bin/pg_basebackup/pg_receivexlog.c | 4 ++--
src/bin/pg_basebackup/pg_recvlogical.c | 4 ++--
src/bin/pg_basebackup/streamutil.c | 6 +++---
src/bin/pg_basebackup/streamutil.h | 2 +-
5 files changed, 10 insertions(+), 10 deletions(-
New functions tarHeaderRename() and tarHeaderGetName() are exposed to
store and retrieve the longer filenames.
tarCreateHeader() continues to limit filenames to 99 bytes to preserve
compatability with existing consumers.
---
src/include/pgtar.h | 2 +
src/port/tar.c | 134 +
This is just a simple refactor for readability and reusability.
---
src/bin/pg_basebackup/pg_basebackup.c | 46 ---
1 file changed, 26 insertions(+), 20 deletions(-)
diff --git a/src/bin/pg_basebackup/pg_basebackup.c
b/src/bin/pg_basebackup/pg_basebackup.c
index f