1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

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.
This commit is contained in:
Heikki Linnakangas
2011-01-31 18:13:01 +02:00
parent 48c9de8028
commit 997b48ed96
5 changed files with 295 additions and 113 deletions

View File

@ -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 */