@@ -146,15 +146,6 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo, bool no_sync, bool
146
146
current .tli = get_current_timeline_from_control (false);
147
147
#endif
148
148
149
- /* In PAGE mode or in ARCHIVE wal-mode wait for current segment */
150
- if (current .backup_mode == BACKUP_MODE_DIFF_PAGE || !stream_wal )
151
- /*
152
- * Do not wait start_lsn for stream backup.
153
- * Because WAL streaming will start after pg_start_backup() in stream
154
- * mode.
155
- */
156
- wait_wal_lsn (current .start_lsn , true, current .tli , false, true, ERROR , false);
157
-
158
149
/*
159
150
* In incremental backup mode ensure that already-validated
160
151
* backup on current timeline exists and get its filelist.
@@ -264,10 +255,14 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo, bool no_sync, bool
264
255
/* Update running backup meta with START LSN */
265
256
write_backup (& current , true);
266
257
267
- join_path_components (external_prefix , current .database_dir , EXTERNAL_DIR );
268
-
269
- /* initialize backup's file list */
270
- backup_files_list = parray_new ();
258
+ /* In PAGE mode or in ARCHIVE wal-mode wait for current segment */
259
+ if (current .backup_mode == BACKUP_MODE_DIFF_PAGE || !stream_wal )
260
+ /*
261
+ * Do not wait start_lsn for stream backup.
262
+ * Because WAL streaming will start after pg_start_backup() in stream
263
+ * mode.
264
+ */
265
+ wait_wal_lsn (current .start_lsn , true, current .tli , false, true, ERROR , false);
271
266
272
267
/* start stream replication */
273
268
if (stream_wal )
@@ -279,6 +274,10 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo, bool no_sync, bool
279
274
current .start_lsn , current .tli );
280
275
}
281
276
277
+ /* initialize backup's file list */
278
+ backup_files_list = parray_new ();
279
+ join_path_components (external_prefix , current .database_dir , EXTERNAL_DIR );
280
+
282
281
/* list files with the logical path. omit $PGDATA */
283
282
if (fio_is_remote (FIO_DB_HOST ))
284
283
fio_list_dir (backup_files_list , instance_config .pgdata ,
0 commit comments