Skip to content

Commit db73f84

Browse files
committed
[Issue #101] Multiple spelling fixes. Reported by Alexander Lakhin
1 parent 44923e7 commit db73f84

33 files changed

+79
-77
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ gen_probackup_project.pl C:\path_to_postgresql_source_tree
112112

113113
Currently the latest documentation can be found at [github](https://github.com/postgrespro/pg_probackup/blob/master/Documentation.md) and [Postgres Pro Enterprise documentation](https://postgrespro.com/docs/postgrespro/current/app-pgprobackup).
114114

115-
## Licence
115+
## License
116116

117-
This module available under the [license](LICENSE) similar to [PostgreSQL](https://www.postgresql.org/about/licence/).
117+
This module available under the [license](LICENSE) similar to [PostgreSQL](https://www.postgresql.org/about/license/).
118118

119119
## Feedback
120120

Diff for: gen_probackup_project.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
our $currpath;
66

77
BEGIN {
8-
# path to the pg_pprobackup dir
8+
# path to the pg_probackup dir
99
$currpath = File::Basename::dirname(Cwd::abs_path($0));
1010
use Cwd;
1111
use File::Basename;

Diff for: src/backup.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
/*
3030
* Macro needed to parse ptrack.
31-
* NOTE Keep those values syncronised with definitions in ptrack.h
31+
* NOTE Keep those values synchronized with definitions in ptrack.h
3232
*/
3333
#define PTRACK_BITS_PER_HEAPBLOCK 1
3434
#define HEAPBLOCKS_PER_BYTE (BITS_PER_BYTE / PTRACK_BITS_PER_HEAPBLOCK)
@@ -39,7 +39,7 @@ static XLogRecPtr stop_stream_lsn = InvalidXLogRecPtr;
3939

4040
/*
4141
* How long we should wait for streaming end in seconds.
42-
* Retreived as checkpoint_timeout + checkpoint_timeout * 0.1
42+
* Retrieved as checkpoint_timeout + checkpoint_timeout * 0.1
4343
*/
4444
static uint32 stream_stop_timeout = 0;
4545
/* Time in which we started to wait for streaming end */
@@ -451,7 +451,7 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo)
451451

452452
/* Run threads */
453453
thread_interrupted = false;
454-
elog(INFO, "Start transfering data files");
454+
elog(INFO, "Start transferring data files");
455455
for (i = 0; i < num_threads; i++)
456456
{
457457
backup_files_arg *arg = &(threads_args[i]);
@@ -468,7 +468,7 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo)
468468
backup_isok = false;
469469
}
470470
if (backup_isok)
471-
elog(INFO, "Data files are transfered");
471+
elog(INFO, "Data files are transferred");
472472
else
473473
elog(ERROR, "Data files transferring failed");
474474

@@ -686,7 +686,7 @@ do_backup(time_t start_time, bool no_validate)
686686
/* below perform checks specific for backup command */
687687
#if PG_VERSION_NUM >= 110000
688688
if (!RetrieveWalSegSize(backup_conn))
689-
elog(ERROR, "Failed to retreive wal_segment_size");
689+
elog(ERROR, "Failed to retrieve wal_segment_size");
690690
#endif
691691

692692
is_ptrack_support = pg_ptrack_support(backup_conn);
@@ -1346,7 +1346,7 @@ wait_wal_lsn(XLogRecPtr lsn, bool is_start_lsn, bool wait_prev_segment)
13461346

13471347
tli = get_current_timeline(false);
13481348

1349-
/* Compute the name of the WAL file containig requested LSN */
1349+
/* Compute the name of the WAL file containing requested LSN */
13501350
GetXLogSegNo(lsn, targetSegNo, instance_config.xlog_seg_size);
13511351
if (wait_prev_segment)
13521352
targetSegNo--;
@@ -1862,7 +1862,7 @@ pg_stop_backup(pgBackup *backup, PGconn *pg_startbackup_conn,
18621862
}
18631863

18641864
/*
1865-
* Retreive checkpoint_timeout GUC value in seconds.
1865+
* Retrieve checkpoint_timeout GUC value in seconds.
18661866
*/
18671867
static int
18681868
checkpoint_timeout(PGconn *backup_conn)
@@ -2360,7 +2360,7 @@ make_pagemap_from_ptrack(parray *files, PGconn *backup_conn)
23602360
if (ptrack_nonparsed != NULL)
23612361
{
23622362
/*
2363-
* pg_ptrack_get_and_clear() returns ptrack with VARHDR cutted out.
2363+
* pg_ptrack_get_and_clear() returns ptrack with VARHDR cut out.
23642364
* Compute the beginning of the ptrack map related to this segment
23652365
*
23662366
* HEAPBLOCKS_PER_BYTE. Number of heap pages one ptrack byte can track: 8

Diff for: src/catalog.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ lock_backup(pgBackup *backup)
260260

261261
fio_unlink(lock_file, FIO_BACKUP_HOST);
262262
errno = save_errno;
263-
elog(ERROR, "Culd not write lock file \"%s\": %s",
263+
elog(ERROR, "Could not write lock file \"%s\": %s",
264264
lock_file, strerror(errno));
265265
}
266266

@@ -1022,7 +1022,7 @@ parse_compress_alg(const char *arg)
10221022
len = strlen(arg);
10231023

10241024
if (len == 0)
1025-
elog(ERROR, "compress algrorithm is empty");
1025+
elog(ERROR, "compress algorithm is empty");
10261026

10271027
if (pg_strncasecmp("zlib", arg, len) == 0)
10281028
return ZLIB_COMPRESS;
@@ -1231,7 +1231,7 @@ find_parent_full_backup(pgBackup *current_backup)
12311231
}
12321232

12331233
/*
1234-
* Interate over parent chain and look for any problems.
1234+
* Iterate over parent chain and look for any problems.
12351235
* Return 0 if chain is broken.
12361236
* result_backup must contain oldest existing backup after missing backup.
12371237
* we have no way to know if there are multiple missing backups.
@@ -1262,7 +1262,7 @@ scan_parent_chain(pgBackup *current_backup, pgBackup **result_backup)
12621262
target_backup = target_backup->parent_backup_link;
12631263
}
12641264

1265-
/* Prevous loop will skip FULL backup because his parent_backup_link is NULL */
1265+
/* Previous loop will skip FULL backup because his parent_backup_link is NULL */
12661266
if (target_backup->backup_mode == BACKUP_MODE_FULL &&
12671267
(target_backup->status != BACKUP_STATUS_OK &&
12681268
target_backup->status != BACKUP_STATUS_DONE))

Diff for: src/checkdb.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ typedef struct pg_indexEntry
8181
char *name;
8282
char *namespace;
8383
bool heapallindexed_is_supported;
84-
/* schema where amcheck extention is located */
84+
/* schema where amcheck extension is located */
8585
char *amcheck_nspname;
8686
/* lock for synchronization of parallel threads */
8787
volatile pg_atomic_flag lock;
@@ -408,7 +408,7 @@ get_index_list(const char *dbname, bool first_db_with_amcheck,
408408
PQgetvalue(res, 0, 2), PQgetvalue(res, 0, 1));
409409

410410
if (!heapallindexed_is_supported && heapallindexed)
411-
elog(WARNING, "Extension '%s' verion %s in schema '%s'"
411+
elog(WARNING, "Extension '%s' version %s in schema '%s'"
412412
"do not support 'heapallindexed' option",
413413
PQgetvalue(res, 0, 0), PQgetvalue(res, 0, 2),
414414
PQgetvalue(res, 0, 1));

Diff for: src/data.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ page_may_be_compressed(Page page, CompressAlg alg, uint32 backup_version)
159159
return false;
160160
}
161161
#endif
162-
/* otherwize let's try to decompress the page */
162+
/* otherwise let's try to decompress the page */
163163
return true;
164164
}
165165
return false;
@@ -396,7 +396,7 @@ prepare_page(ConnectionArgs *arguments,
396396
{
397397
/*
398398
* We need to copy the page that was successfully
399-
* retreieved from ptrack into our output "page" parameter.
399+
* retrieved from ptrack into our output "page" parameter.
400400
* We must set checksum here, because it is outdated
401401
* in the block recieved from shared buffers.
402402
*/
@@ -482,7 +482,7 @@ compress_and_backup_page(pgFile *file, BlockNumber blknum,
482482
compressed_page, header.compressed_size);
483483
write_buffer_size += MAXALIGN(header.compressed_size);
484484
}
485-
/* Nonpositive value means that compression failed. Write it as is. */
485+
/* Non-positive value means that compression failed. Write it as is. */
486486
else
487487
{
488488
header.compressed_size = BLCKSZ;
@@ -754,7 +754,7 @@ restore_data_file(const char *to_path, pgFile *file, bool allow_truncate,
754754
DataPage page;
755755
int32 uncompressed_size = 0;
756756

757-
/* File didn`t changed. Nothig to copy */
757+
/* File didn`t changed. Nothing to copy */
758758
if (file->write_size == BYTES_INVALID)
759759
break;
760760

@@ -887,7 +887,7 @@ restore_data_file(const char *to_path, pgFile *file, bool allow_truncate,
887887
* DELTA backup have no knowledge about truncated blocks as PAGE or PTRACK do
888888
* But during DELTA backup we read every file in PGDATA and thus DELTA backup
889889
* knows exact size of every file at the time of backup.
890-
* So when restoring file from DELTA backup we, knowning it`s size at
890+
* So when restoring file from DELTA backup we, knowing it`s size at
891891
* a time of a backup, can truncate file to this size.
892892
*/
893893
if (allow_truncate && file->n_blocks != BLOCKNUM_INVALID && !need_truncate)

Diff for: src/delete.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ do_delete(time_t backup_id)
116116
*
117117
* Invalid backups handled in Oracle style, so invalid backups are ignored
118118
* for the purpose of retention fulfillment,
119-
* i.e. CORRUPT full backup do not taken in account when deteremine
119+
* i.e. CORRUPT full backup do not taken in account when determine
120120
* which FULL backup should be keeped for redundancy obligation(only valid do),
121121
* but if invalid backup is not guarded by retention - it is removed
122122
*/
@@ -491,7 +491,7 @@ do_retention_merge(parray *backup_list, parray *to_keep_list, parray *to_purge_l
491491
* 2 PAGE1
492492
* 3 FULL
493493
*
494-
* Сonsequentially merge incremental backups from PAGE1 to PAGE3
494+
* Consequentially merge incremental backups from PAGE1 to PAGE3
495495
* into FULL.
496496
*/
497497

Diff for: src/dir.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ create_data_directories(parray *dest_files, const char *data_dir, const char *ba
10751075
}
10761076

10771077
/*
1078-
* Read names of symbolik names of tablespaces with links to directories from
1078+
* Read names of symbolic names of tablespaces with links to directories from
10791079
* tablespace_map or tablespace_map.txt.
10801080
*/
10811081
void
@@ -1568,7 +1568,7 @@ pgFileSize(const char *path)
15681568
}
15691569

15701570
/*
1571-
* Construct parray containing remmaped external directories paths
1571+
* Construct parray containing remapped external directories paths
15721572
* from string like /path1:/path2
15731573
*/
15741574
parray *

Diff for: src/help.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ help_show(void)
540540
printf(_(" [--format=format]\n\n"));
541541

542542
printf(_(" -B, --backup-path=backup-path location of the backup storage area\n"));
543-
printf(_(" --instance=instance_name show info about specific intstance\n"));
543+
printf(_(" --instance=instance_name show info about specific instance\n"));
544544
printf(_(" -i, --backup-id=backup-id show info about specific backups\n"));
545545
printf(_(" --format=format show format=PLAIN|JSON\n\n"));
546546
}

Diff for: src/merge.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ merge_backups(pgBackup *to_backup, pgBackup *from_backup)
270270
false);
271271

272272
/*
273-
* Rename external directoties in to_backup (if exists)
273+
* Rename external directories in to_backup (if exists)
274274
* according to numeration of external dirs in from_backup.
275275
*/
276276
if (to_external)
@@ -594,6 +594,8 @@ merge_files(void *arg)
594594
elog(VERBOSE, "Merge target and source files into the temporary path \"%s\"",
595595
merge_to_file_path);
596596

597+
// TODO: truncate merge_to_file_path just in case?
598+
597599
/*
598600
* file->path is relative, to_file_path - is absolute.
599601
* Substitute them.

Diff for: src/parsexlog.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ static XLogRecPtr wal_target_lsn = InvalidXLogRecPtr;
228228
* Read WAL from the archive directory, from 'startpoint' to 'endpoint' on the
229229
* given timeline. Collect data blocks touched by the WAL records into a page map.
230230
*
231-
* Pagemap extracting is processed using threads. Eeach thread reads single WAL
231+
* Pagemap extracting is processed using threads. Each thread reads single WAL
232232
* file.
233233
*/
234234
void
@@ -1491,7 +1491,7 @@ extractPageInfo(XLogReaderState *record, XLogReaderData *reader_data,
14911491
if (!XLogRecGetBlockTag(record, block_id, &rnode, &forknum, &blkno))
14921492
continue;
14931493

1494-
/* We only care about the main fork; others are copied in toto */
1494+
/* We only care about the main fork; others are copied as is */
14951495
if (forknum != MAIN_FORKNUM)
14961496
continue;
14971497

Diff for: src/pg_probackup.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ main(int argc, char *argv[])
490490

491491
/* Usually checkdb for file logging requires log_directory
492492
* to be specified explicitly, but if backup_dir and instance name are provided,
493-
* checkdb can use the tusual default values or values from config
493+
* checkdb can use the usual default values or values from config
494494
*/
495495
if (backup_subcmd == CHECKDB_CMD &&
496496
(instance_config.logger.log_level_file != LOG_OFF &&

Diff for: src/pg_probackup.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ extern const char *PROGRAM_EMAIL;
6666
#define ARCHIVE_TIMEOUT_DEFAULT 300
6767
#define REPLICA_TIMEOUT_DEFAULT 300
6868

69-
/* Direcotry/File permission */
69+
/* Directory/File permission */
7070
#define DIR_PERMISSION (0700)
7171
#define FILE_PERMISSION (0600)
7272

@@ -264,7 +264,7 @@ struct pgBackup
264264
time_t backup_id; /* Identifier of the backup.
265265
* Currently it's the same as start_time */
266266
BackupStatus status; /* Status - one of BACKUP_STATUS_xxx above*/
267-
TimeLineID tli; /* timeline of start and stop baskup lsns */
267+
TimeLineID tli; /* timeline of start and stop backup lsns */
268268
XLogRecPtr start_lsn; /* backup's starting transaction log location */
269269
XLogRecPtr stop_lsn; /* backup's finishing transaction log location */
270270
time_t start_time; /* since this moment backup has status

Diff for: src/restore.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
298298
{
299299
check_tablespace_mapping(dest_backup);
300300

301-
/* no point in checking external directories if their restore is not resquested */
301+
/* no point in checking external directories if their restore is not requested */
302302
if (!skip_external_dirs)
303303
check_external_dir_mapping(dest_backup);
304304
}
@@ -377,7 +377,7 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
377377
rt->target_xid, rt->target_lsn,
378378
base_full_backup->tli, instance_config.xlog_seg_size);
379379
}
380-
/* Orphinize every OK descendant of corrupted backup */
380+
/* Orphanize every OK descendant of corrupted backup */
381381
else
382382
{
383383
char *corrupted_backup_id;
@@ -1064,7 +1064,7 @@ parseRecoveryTargetOptions(const char *target_time,
10641064
if (parse_lsn(target_lsn, &dummy_lsn))
10651065
rt->target_lsn = dummy_lsn;
10661066
else
1067-
elog(ERROR, "Invalid value of --ecovery-target-lsn option %s",
1067+
elog(ERROR, "Invalid value of --recovery-target-lsn option %s",
10681068
target_lsn);
10691069
}
10701070

Diff for: src/utils/file.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ typedef struct
3737
/* Convert FIO pseudo handle to index in file descriptor array */
3838
#define fio_fileno(f) (((size_t)f - 1) | FIO_PIPE_MARKER)
3939

40-
/* Use specified file descriptors as stding/stdout for FIO functions */
40+
/* Use specified file descriptors as stdin/stdout for FIO functions */
4141
void fio_redirect(int in, int out)
4242
{
4343
fio_stdin = in;
@@ -726,7 +726,7 @@ int fio_access(char const* path, int mode, fio_location location)
726726
}
727727
}
728728

729-
/* Create symbolink link */
729+
/* Create symbolic link */
730730
int fio_symlink(char const* target, char const* link_path, fio_location location)
731731
{
732732
if (fio_is_remote(location))
@@ -822,7 +822,7 @@ int fio_mkdir(char const* path, int mode, fio_location location)
822822
}
823823
}
824824

825-
/* Checnge file mode */
825+
/* Change file mode */
826826
int fio_chmod(char const* path, int mode, fio_location location)
827827
{
828828
if (fio_is_remote(location))
@@ -954,7 +954,7 @@ fio_gzread(gzFile f, void *buf, unsigned size)
954954

955955
while (1)
956956
{
957-
if (gz->strm.avail_in != 0) /* If there is some data in receiver buffer, then decmpress it */
957+
if (gz->strm.avail_in != 0) /* If there is some data in receiver buffer, then decompress it */
958958
{
959959
rc = inflate(&gz->strm, Z_NO_FLUSH);
960960
if (rc == Z_STREAM_END)
@@ -1021,7 +1021,7 @@ fio_gzwrite(gzFile f, void const* buf, unsigned size)
10211021
{
10221022
rc = deflate(&gz->strm, Z_NO_FLUSH);
10231023
Assert(rc == Z_OK);
1024-
gz->strm.next_out = gz->buf; /* Reset pointer to the beginning of bufer */
1024+
gz->strm.next_out = gz->buf; /* Reset pointer to the beginning of buffer */
10251025
}
10261026
else
10271027
{
@@ -1429,7 +1429,7 @@ void fio_communicate(int in, int out)
14291429
case FIO_UNLINK: /* Remove file or directory (TODO: Win32) */
14301430
SYS_CHECK(remove_file_or_dir(buf));
14311431
break;
1432-
case FIO_MKDIR: /* Create direcory */
1432+
case FIO_MKDIR: /* Create directory */
14331433
hdr.size = 0;
14341434
hdr.arg = dir_create_dir(buf, hdr.arg);
14351435
IO_CHECK(fio_write_all(out, &hdr, sizeof(hdr)), sizeof(hdr));

Diff for: src/utils/parray.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/* members of struct parray are hidden from client. */
1616
struct parray
1717
{
18-
void **data; /* poiter array, expanded if necessary */
18+
void **data; /* pointer array, expanded if necessary */
1919
size_t alloced; /* number of elements allocated */
2020
size_t used; /* number of elements in use */
2121
};
@@ -97,7 +97,7 @@ parray_insert(parray *array, size_t index, void *elem)
9797
}
9898

9999
/*
100-
* Concatinate two parray.
100+
* Concatenate two parray.
101101
* parray_concat() appends the copy of the content of src to the end of dest.
102102
*/
103103
parray *

0 commit comments

Comments
 (0)