summaryrefslogtreecommitdiff
path: root/src/backend/backup/basebackup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/backup/basebackup.c')
-rw-r--r--src/backend/backup/basebackup.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c
index 3fb9451643..1be55e485f 100644
--- a/src/backend/backup/basebackup.c
+++ b/src/backend/backup/basebackup.c
@@ -1568,14 +1568,6 @@ sendFile(bbsink *sink, const char *readfilename, const char *tarfilename,
len, readfilename, true);
/*
- * If we hit end-of-file, a concurrent truncation must have occurred.
- * That's not an error condition, because WAL replay will fix things
- * up.
- */
- if (cnt == 0)
- break;
-
- /*
* The checksums are verified at block level, so we iterate over the
* buffer in chunks of BLCKSZ, after making sure that
* TAR_SEND_SIZE/buf is divisible by BLCKSZ and we read a multiple of
@@ -1677,6 +1669,15 @@ sendFile(bbsink *sink, const char *readfilename, const char *tarfilename,
}
}
+ /*
+ * If we hit end-of-file, a concurrent truncation must have occurred.
+ * That's not an error condition, because WAL replay will fix things
+ * up.
+ */
+ if (cnt == 0)
+ break;
+
+ /* Archive the data we just read. */
bbsink_archive_contents(sink, cnt);
/* Also feed it to the checksum machinery. */