From 997b48ed96c476650f87ca75d65c9fc1f6273f5a Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Mon, 31 Jan 2011 18:13:01 +0200 Subject: Support multiple concurrent pg_basebackup backups. With this patch, pg_basebackup doesn't write a backup_label file in the data directory, so it doesn't interfere with a pg_start/stop_backup() based backup anymore. backup_label is still included in the backup, but it is injected directly into the tar stream. Heikki Linnakangas, reviewed by Fujii Masao and Magnus Hagander. --- src/include/access/xlog.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/include/access/xlog.h') diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h index 74d34279de2..122e96b5d11 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -312,8 +312,15 @@ extern void HandleStartupProcInterrupts(void); extern void StartupProcessMain(void); extern void WakeupRecovery(void); -extern XLogRecPtr do_pg_start_backup(const char *backupidstr, bool fast); -extern XLogRecPtr do_pg_stop_backup(void); +/* + * Starting/stopping a base backup + */ +extern XLogRecPtr do_pg_start_backup(const char *backupidstr, bool fast, char **labelfile); +extern XLogRecPtr do_pg_stop_backup(char *labelfile); extern void do_pg_abort_backup(void); +/* File path names (all relative to $PGDATA) */ +#define BACKUP_LABEL_FILE "backup_label" +#define BACKUP_LABEL_OLD "backup_label.old" + #endif /* XLOG_H */ -- cgit v1.2.3