@@ -483,15 +483,15 @@ merge_chain(parray *parent_chain, pgBackup *full_backup, pgBackup *dest_backup)
483
483
484
484
/* TODO: Should we keep relying on caller to provide valid parent_chain? */
485
485
486
- /* If destination backup compression algorihtm differs from
487
- * full backup compression algorihtm , then in-place merge is
486
+ /* If destination backup compression algorithm differs from
487
+ * full backup compression algorithm , then in-place merge is
488
488
* not possible.
489
489
*/
490
490
if (full_backup -> compress_alg == dest_backup -> compress_alg )
491
491
compression_match = true;
492
492
else
493
493
elog (WARNING , "In-place merge is disabled because of compression "
494
- "algorihtms mismatch" );
494
+ "algorithms mismatch" );
495
495
496
496
/*
497
497
* If current program version differs from destination backup version,
@@ -823,8 +823,9 @@ merge_files(void *arg)
823
823
{
824
824
int i ;
825
825
merge_files_arg * arguments = (merge_files_arg * ) arg ;
826
+ size_t n_files = parray_num (arguments -> dest_backup -> files );
826
827
827
- for (i = 0 ; i < parray_num ( arguments -> dest_backup -> files ) ; i ++ )
828
+ for (i = 0 ; i < n_files ; i ++ )
828
829
{
829
830
pgFile * dest_file = (pgFile * ) parray_get (arguments -> dest_backup -> files , i );
830
831
pgFile * tmp_file ;
@@ -850,7 +851,7 @@ merge_files(void *arg)
850
851
851
852
if (progress )
852
853
elog (INFO , "Progress: (%d/%lu). Merging file \"%s\"" ,
853
- i + 1 , ( unsigned long ) parray_num ( arguments -> dest_backup -> files ) , dest_file -> rel_path );
854
+ i + 1 , n_files , dest_file -> rel_path );
854
855
855
856
if (dest_file -> is_datafile && !dest_file -> is_cfs )
856
857
tmp_file -> segno = dest_file -> segno ;
@@ -862,14 +863,13 @@ merge_files(void *arg)
862
863
tmp_file -> crc = dest_file -> crc ;
863
864
864
865
tmp_file -> write_size = 0 ;
865
-
866
866
goto done ;
867
867
}
868
868
869
869
/*
870
870
* If file didn`t changed over the course of all incremental chain,
871
871
* then do in-place merge, unless destination backup has
872
- * different compression algorihtm .
872
+ * different compression algorithm .
873
873
* In-place merge is also impossible, if program version of destination
874
874
* backup differs from PROGRAM_VERSION
875
875
*/
@@ -1072,7 +1072,7 @@ reorder_external_dirs(pgBackup *to_backup, parray *to_external,
1072
1072
1073
1073
/* Merge is usually happens as usual backup/restore via temp files, unless
1074
1074
* file didn`t changed since FULL backup AND full a dest backup have the
1075
- * same compression algorihtm . In this case file can be left as it is.
1075
+ * same compression algorithm . In this case file can be left as it is.
1076
1076
*/
1077
1077
void
1078
1078
merge_data_file (parray * parent_chain , pgBackup * full_backup ,
0 commit comments