diff options
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index d19408b3be3..43615688824 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -39,6 +39,7 @@ #include "catalog/catversion.h" #include "catalog/pg_control.h" #include "catalog/pg_database.h" +#include "commands/progress.h" #include "commands/tablespace.h" #include "common/controldata_utils.h" #include "miscadmin.h" @@ -10228,6 +10229,10 @@ issue_xlog_fsync(int fd, XLogSegNo segno) * active at the same time, and they don't conflict with an exclusive backup * either. * + * tablespaces is required only when this function is called while + * the streaming base backup requested by pg_basebackup is running. + * NULL should be specified otherwise. + * * tblspcmapfile is required mainly for tar format in windows as native windows * utilities are not able to create symlinks while extracting files from tar. * However for consistency, the same is used for all platforms. @@ -10470,6 +10475,14 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p, datadirpathlen = strlen(DataDir); + /* + * Report that we are now estimating the total backup size + * if we're streaming base backup as requested by pg_basebackup + */ + if (tablespaces) + pgstat_progress_update_param(PROGRESS_BASEBACKUP_PHASE, + PROGRESS_BASEBACKUP_PHASE_ESTIMATE_BACKUP_SIZE); + /* Collect information about all tablespaces */ tblspcdir = AllocateDir("pg_tblspc"); while ((de = ReadDir(tblspcdir, "pg_tblspc")) != NULL) |