Skip to content

Commit fa326c9

Browse files
committed
[Issue #169] minor spelling fixes
1 parent 0b16fc0 commit fa326c9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/merge.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -483,15 +483,15 @@ merge_chain(parray *parent_chain, pgBackup *full_backup, pgBackup *dest_backup)
483483

484484
/* TODO: Should we keep relying on caller to provide valid parent_chain? */
485485

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
488488
* not possible.
489489
*/
490490
if (full_backup->compress_alg == dest_backup->compress_alg)
491491
compression_match = true;
492492
else
493493
elog(WARNING, "In-place merge is disabled because of compression "
494-
"algorihtms mismatch");
494+
"algorithms mismatch");
495495

496496
/*
497497
* If current program version differs from destination backup version,
@@ -823,8 +823,9 @@ merge_files(void *arg)
823823
{
824824
int i;
825825
merge_files_arg *arguments = (merge_files_arg *) arg;
826+
size_t n_files = parray_num(arguments->dest_backup->files);
826827

827-
for (i = 0; i < parray_num(arguments->dest_backup->files); i++)
828+
for (i = 0; i < n_files; i++)
828829
{
829830
pgFile *dest_file = (pgFile *) parray_get(arguments->dest_backup->files, i);
830831
pgFile *tmp_file;
@@ -850,7 +851,7 @@ merge_files(void *arg)
850851

851852
if (progress)
852853
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);
854855

855856
if (dest_file->is_datafile && !dest_file->is_cfs)
856857
tmp_file->segno = dest_file->segno;
@@ -862,14 +863,13 @@ merge_files(void *arg)
862863
tmp_file->crc = dest_file->crc;
863864

864865
tmp_file->write_size = 0;
865-
866866
goto done;
867867
}
868868

869869
/*
870870
* If file didn`t changed over the course of all incremental chain,
871871
* then do in-place merge, unless destination backup has
872-
* different compression algorihtm.
872+
* different compression algorithm.
873873
* In-place merge is also impossible, if program version of destination
874874
* backup differs from PROGRAM_VERSION
875875
*/
@@ -1072,7 +1072,7 @@ reorder_external_dirs(pgBackup *to_backup, parray *to_external,
10721072

10731073
/* Merge is usually happens as usual backup/restore via temp files, unless
10741074
* 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.
10761076
*/
10771077
void
10781078
merge_data_file(parray *parent_chain, pgBackup *full_backup,

0 commit comments

Comments
 (0)