pgsql: Add pg_basebackup tool for streaming base backups

Lists: pgsql-committers
From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add pg_basebackup tool for streaming base backups
Date: 2011-01-23 11:33:27
Message-ID: E1PgyCF-0000vq-A6@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

Add pg_basebackup tool for streaming base backups

This tool makes it possible to do the pg_start_backup/
copy files/pg_stop_backup step in a single command.

There are still some steps to be done before this is a
complete backup solution, such as the ability to stream
the required WAL logs, but it's still usable, and
could do with some buildfarm coverage.

In passing, make the checkpoint request optionally
fast instead of hardcoding it.

Magnus Hagander, reviewed by Fujii Masao and Dimitri Fontaine

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=048d148fe63102fafb2336ab5439c950dea7f692

Modified Files
--------------
doc/src/sgml/backup.sgml | 10 +
doc/src/sgml/config.sgml | 3 +-
doc/src/sgml/protocol.sgml | 11 +-
doc/src/sgml/ref/allfiles.sgml | 1 +
doc/src/sgml/ref/pg_basebackup.sgml | 397 ++++++++++++
doc/src/sgml/reference.sgml | 1 +
src/backend/replication/basebackup.c | 19 +-
src/backend/replication/repl_gram.y | 11 +-
src/backend/replication/repl_scanner.l | 1 +
src/backend/replication/walsender.c | 2 +-
src/bin/Makefile | 2 +-
src/bin/pg_basebackup/Makefile | 38 ++
src/bin/pg_basebackup/nls.mk | 5 +
src/bin/pg_basebackup/pg_basebackup.c | 1035 ++++++++++++++++++++++++++++++++
src/include/replication/basebackup.h | 2 +-
src/include/replication/replnodes.h | 1 +
src/tools/msvc/Mkvcbuild.pm | 2 +
17 files changed, 1528 insertions(+), 13 deletions(-)


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add pg_basebackup tool for streaming base backups
Date: 2011-01-23 17:14:31
Message-ID: 10361.1295802871@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

Magnus Hagander <magnus(at)hagander(dot)net> writes:
> Add pg_basebackup tool for streaming base backups

The Windows buildfarm members would like this patch better if you used
pg_strcasecmp not strcasecmp.

regards, tom lane


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add pg_basebackup tool for streaming base backups
Date: 2011-01-23 17:22:30
Message-ID: AANLkTikCSSiw24tGn3heBPSWkzP+6GpXbuma66sSjXRs@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

On Sun, Jan 23, 2011 at 18:14, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> Add pg_basebackup tool for streaming base backups
>
> The Windows buildfarm members would like this patch better if you used
> pg_strcasecmp not strcasecmp.
>

Yeah, I've applied a patch for that already.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add pg_basebackup tool for streaming base backups
Date: 2011-01-23 17:24:00
Message-ID: 10528.1295803440@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

Magnus Hagander <magnus(at)hagander(dot)net> writes:
> On Sun, Jan 23, 2011 at 18:14, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> The Windows buildfarm members would like this patch better if you used
>> pg_strcasecmp not strcasecmp.

> Yeah, I've applied a patch for that already.

Ah, yes, see it now. Sorry for the noise.

regards, tom lane