@@ -222,6 +222,7 @@ do_backup_instance(void)
222222 backup_files_list = parray_new ();
223223
224224 /* list files with the logical path. omit $PGDATA */
225+ dir_list_file (backup_files_list , pgdata , true, true, false);
225226 add_pgdata_files (backup_files_list , pgdata );
226227
227228 if (current .backup_mode != BACKUP_MODE_FULL )
@@ -251,7 +252,8 @@ do_backup_instance(void)
251252 */
252253 !from_replica );
253254 }
254- else if (current .backup_mode == BACKUP_MODE_DIFF_PTRACK )
255+
256+ if (current .backup_mode == BACKUP_MODE_DIFF_PTRACK )
255257 {
256258 XLogRecPtr ptrack_lsn = get_last_ptrack_lsn ();
257259
@@ -295,6 +297,7 @@ do_backup_instance(void)
295297 dir_create_dir (dirpath , DIR_PERMISSION );
296298 }
297299
300+ /* setup threads */
298301 __sync_lock_release (& file -> lock );
299302 }
300303
@@ -1601,16 +1604,18 @@ backup_files(void *arg)
16011604}
16021605
16031606/*
1604- * Append files to the backup list array.
1607+ * Extract information about files in backup_list parsing their names:
1608+ * - remove temp tables from the list
1609+ * - set flags for datafiles
1610+ * - link ptrack files with main fork files
1611+ * TODO: rename the function
1612+ * TODO: review flags
16051613 */
16061614static void
16071615add_pgdata_files (parray * files , const char * root )
16081616{
16091617 size_t i ;
16101618
1611- /* list files with the logical path. omit $PGDATA */
1612- dir_list_file (files , root , true, true, false);
1613-
16141619 /* mark files that are possible datafile as 'datafile' */
16151620 for (i = 0 ; i < parray_num (files ); i ++ )
16161621 {
0 commit comments