Обсуждение: pgsql: Add pg_basebackup tool for streaming base backups

Поиск
Список
Период
Сортировка

pgsql: Add pg_basebackup tool for streaming base backups

От
Magnus Hagander
Дата:
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(-)


Re: pgsql: Add pg_basebackup tool for streaming base backups

От
Tom Lane
Дата:
Magnus Hagander <magnus@hagander.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

Re: pgsql: Add pg_basebackup tool for streaming base backups

От
Magnus Hagander
Дата:
On Sun, Jan 23, 2011 at 18:14, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Magnus Hagander <magnus@hagander.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/

Re: pgsql: Add pg_basebackup tool for streaming base backups

От
Tom Lane
Дата:
Magnus Hagander <magnus@hagander.net> writes:
> On Sun, Jan 23, 2011 at 18:14, Tom Lane <tgl@sss.pgh.pa.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