aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/xlog.h
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2015-05-12 09:29:10 -0400
committerAndrew Dunstan <andrew@dunslane.net>2015-05-12 09:29:10 -0400
commit72d422a5227ef6f76f412486a395aba9f53bf3f0 (patch)
treec94ffeef53c5e4a4ce0c4b055a8256ee6af3b947 /src/include/access/xlog.h
parentd02f16470f117db3038dbfd87662d5f0eb5a2a9b (diff)
downloadpostgresql-72d422a5227ef6f76f412486a395aba9f53bf3f0.tar.gz
postgresql-72d422a5227ef6f76f412486a395aba9f53bf3f0.zip
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.
Diffstat (limited to 'src/include/access/xlog.h')
-rw-r--r--src/include/access/xlog.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h
index f08b6767ed7..961e0506221 100644
--- a/src/include/access/xlog.h
+++ b/src/include/access/xlog.h
@@ -17,6 +17,8 @@
#include "access/xlogreader.h"
#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
+#include "nodes/pg_list.h"
+#include "storage/fd.h"
/* Sync methods */
@@ -258,7 +260,9 @@ extern void assign_checkpoint_completion_target(double newval, void *extra);
* Starting/stopping a base backup
*/
extern XLogRecPtr do_pg_start_backup(const char *backupidstr, bool fast,
- TimeLineID *starttli_p, char **labelfile);
+ TimeLineID *starttli_p, char **labelfile, DIR *tblspcdir,
+ List **tablespaces, char **tblspcmapfile, bool infotbssize,
+ bool needtblspcmapfile);
extern XLogRecPtr do_pg_stop_backup(char *labelfile, bool waitforarchive,
TimeLineID *stoptli_p);
extern void do_pg_abort_backup(void);
@@ -267,4 +271,7 @@ extern void do_pg_abort_backup(void);
#define BACKUP_LABEL_FILE "backup_label"
#define BACKUP_LABEL_OLD "backup_label.old"
+#define TABLESPACE_MAP "tablespace_map"
+#define TABLESPACE_MAP_OLD "tablespace_map.old"
+
#endif /* XLOG_H */