Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite47b020

Browse files
committed
code cleanup. add more comments
1 parent43efdd3 commite47b020

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

‎src/backup.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
elseif (current.backup_mode==BACKUP_MODE_DIFF_PTRACK)
255+
256+
if (current.backup_mode==BACKUP_MODE_DIFF_PTRACK)
255257
{
256258
XLogRecPtrptrack_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
*/
16061614
staticvoid
16071615
add_pgdata_files(parray*files,constchar*root)
16081616
{
16091617
size_ti;
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

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp