aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2020-06-17 10:57:34 -0400
committerRobert Haas <rhaas@postgresql.org>2020-06-17 10:57:34 -0400
commit1fa092913d260056b1aaf627ebc9cd9655c3a27c (patch)
treec50a870b2bf4480c591143e9df77de87426f2eda /src/backend/access/transam/xlog.c
parenta513f1dfbf2c29a51b0f7cbd5913ce2d2ee452c5 (diff)
downloadpostgresql-1fa092913d260056b1aaf627ebc9cd9655c3a27c.tar.gz
postgresql-1fa092913d260056b1aaf627ebc9cd9655c3a27c.zip
Don't export basebackup.c's sendTablespace().
Commit 72d422a5227ef6f76f412486a395aba9f53bf3f0 made xlog.c call sendTablespace() with the 'sizeonly' argument set to true, which required basebackup.c to export sendTablespace(). However, that's kind of ugly, so instead defer the call to sendTablespace() until basebackup.c regains control. That way, it can still be a static function. Patch by me, reviewed by Amit Kapila and Kyotaro Horiguchi. Discussion: http://postgr.es/m/CA+TgmoYq+59SJ2zBbP891ngWPA9fymOqntqYcweSDYXS2a620A@mail.gmail.com
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 55cac186dc7..a1256a103b6 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -10481,8 +10481,7 @@ issue_xlog_fsync(int fd, XLogSegNo segno)
XLogRecPtr
do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p,
StringInfo labelfile, List **tablespaces,
- StringInfo tblspcmapfile, bool infotbssize,
- bool needtblspcmapfile)
+ StringInfo tblspcmapfile, bool needtblspcmapfile)
{
bool exclusive = (labelfile == NULL);
bool backup_started_in_recovery = false;
@@ -10702,14 +10701,6 @@ 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)
@@ -10774,8 +10765,7 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p,
ti->oid = pstrdup(de->d_name);
ti->path = pstrdup(buflinkpath.data);
ti->rpath = relpath ? pstrdup(relpath) : NULL;
- ti->size = infotbssize ?
- sendTablespace(fullpath, ti->oid, true, NULL) : -1;
+ ti->size = -1;
if (tablespaces)
*tablespaces = lappend(*tablespaces, ti);