Map basebackup tablespaces using a tablespace_map file
Windows can't reliably restore symbolic links from a tar format, so
instead during backup start we create a tablespace_map file, which is
used by the restoring postgres to create the correct links in pg_tblspc.
The backup protocol also now has an option to request this file to be
included in the backup stream, and this is used by pg_basebackup when
operating in tar mode.
This is done on all platforms, not just Windows.
This means that pg_basebackup will not not work in tar mode against 9.4
and older servers, as this protocol option isn't implemented there.
Amit Kapila, reviewed by Dilip Kumar, with a little editing from me.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/72d422a5227ef6f76f412486a395aba9f53bf3f0
Modified Files
--------------
doc/src/sgml/backup.sgml | 32 +--
doc/src/sgml/func.sgml | 14 +-
doc/src/sgml/protocol.sgml | 15 +-
doc/src/sgml/ref/pg_basebackup.sgml | 14 +-
src/backend/access/transam/xlog.c | 387 ++++++++++++++++++++++++++++++--
src/backend/access/transam/xlogfuncs.c | 12 +-
src/backend/replication/basebackup.c | 138 +++++-------
src/backend/replication/repl_gram.y | 16 +-
src/backend/replication/repl_scanner.l | 1 +
src/bin/pg_basebackup/pg_basebackup.c | 5 +-
src/include/access/xlog.h | 9 +-
src/include/replication/basebackup.h | 10 +
12 files changed, 519 insertions(+), 134 deletions(-)