diff options
author | Michael Paquier | 2022-01-25 00:40:04 +0000 |
---|---|---|
committer | Michael Paquier | 2022-01-25 00:40:04 +0000 |
commit | 410aa248e5a883fde4832999cc9b23c7ace0f2ff (patch) | |
tree | e3dba4bbe6b5e60687939a1b04cfaac9a129adb9 /src/backend | |
parent | c817a072aae8441a11d6a0336953ecd69dc548ba (diff) |
Fix various typos, grammar and code style in comments and docs
This fixes a set of issues that have accumulated over the past months
(or years) in various code areas. Most fixes are related to some recent
additions, as of the development of v15.
Author: Justin Pryzby
Discussion: https://postgr.es/m/20220124030001.GQ23027@telsasoft.com
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/access/gin/ginget.c | 2 | ||||
-rw-r--r-- | src/backend/access/heap/heapam.c | 2 | ||||
-rw-r--r-- | src/backend/access/transam/xlog.c | 1 | ||||
-rw-r--r-- | src/backend/catalog/pg_publication.c | 2 | ||||
-rw-r--r-- | src/backend/commands/cluster.c | 2 | ||||
-rw-r--r-- | src/backend/commands/indexcmds.c | 2 | ||||
-rw-r--r-- | src/backend/commands/publicationcmds.c | 2 | ||||
-rw-r--r-- | src/backend/commands/subscriptioncmds.c | 2 | ||||
-rw-r--r-- | src/backend/optimizer/util/appendinfo.c | 2 | ||||
-rw-r--r-- | src/backend/optimizer/util/inherit.c | 2 | ||||
-rw-r--r-- | src/backend/replication/logical/logicalfuncs.c | 2 | ||||
-rw-r--r-- | src/backend/replication/logical/reorderbuffer.c | 2 | ||||
-rw-r--r-- | src/backend/replication/logical/snapbuild.c | 2 | ||||
-rw-r--r-- | src/backend/replication/logical/worker.c | 8 | ||||
-rw-r--r-- | src/backend/statistics/extended_stats.c | 2 | ||||
-rw-r--r-- | src/backend/statistics/mcv.c | 8 | ||||
-rw-r--r-- | src/backend/storage/sync/sync.c | 1 | ||||
-rw-r--r-- | src/backend/utils/activity/backend_progress.c | 4 | ||||
-rw-r--r-- | src/backend/utils/activity/backend_status.c | 2 | ||||
-rw-r--r-- | src/backend/utils/activity/wait_event.c | 2 |
20 files changed, 25 insertions, 27 deletions
diff --git a/src/backend/access/gin/ginget.c b/src/backend/access/gin/ginget.c index a1751c86ccd..fc85ba99ac1 100644 --- a/src/backend/access/gin/ginget.c +++ b/src/backend/access/gin/ginget.c @@ -1319,7 +1319,7 @@ scanGetItem(IndexScanDesc scan, ItemPointerData advancePast, GinScanKey key = so->keys + i; /* - * If we're considering a lossy page, skip excludeOnly keys, They + * If we're considering a lossy page, skip excludeOnly keys. They * can't exclude the whole page anyway. */ if (ItemPointerIsLossyPage(item) && key->excludeOnly) diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 6ec57f3d8b2..98230aac49c 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -8354,7 +8354,7 @@ log_heap_new_cid(Relation relation, HeapTuple tup) /* * Build a heap tuple representing the configured REPLICA IDENTITY to represent - * the old tuple in a UPDATE or DELETE. + * the old tuple in an UPDATE or DELETE. * * Returns NULL if there's no need to log an identity or if there's no suitable * key defined. diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index c9d4cbf3ff5..58922f7edea 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -2706,7 +2706,6 @@ XLogWrite(XLogwrtRqst WriteRqst, TimeLineID tli, bool flexible) */ if (LogwrtResult.Flush < WriteRqst.Flush && LogwrtResult.Flush < LogwrtResult.Write) - { /* * Could get here without iterating above loop, in which case we might diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c index cf0700f8ba0..e14ca2f5630 100644 --- a/src/backend/catalog/pg_publication.c +++ b/src/backend/catalog/pg_publication.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * pg_publication.c + * src/backend/catalog/pg_publication.c * *------------------------------------------------------------------------- */ diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c index 61853e6dec4..2e8efe4f8fc 100644 --- a/src/backend/commands/cluster.c +++ b/src/backend/commands/cluster.c @@ -906,7 +906,7 @@ copy_table_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex, bool verbose, RelationGetRelationName(OldHeap)))); /* - * Hand of the actual copying to AM specific function, the generic code + * Hand off the actual copying to AM specific function, the generic code * cannot know how to deal with visibility across AMs. Note that this * routine is allowed to set FreezeXid / MultiXactCutoff to different * values (e.g. because the AM doesn't use freezing). diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index e5cf1bde13f..42aacc8f0a2 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -2219,7 +2219,7 @@ makeObjectName(const char *name1, const char *name2, const char *label) Assert(availchars > 0); /* else caller chose a bad label */ /* - * If we must truncate, preferentially truncate the longer name. This + * If we must truncate, preferentially truncate the longer name. This * logic could be expressed without a loop, but it's simple and obvious as * a loop. */ diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c index 3ab1bdeae1b..0e4bb97fb73 100644 --- a/src/backend/commands/publicationcmds.c +++ b/src/backend/commands/publicationcmds.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * publicationcmds.c + * src/backend/commands/publicationcmds.c * *------------------------------------------------------------------------- */ diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index f5eba450ceb..3ef6607d246 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * subscriptioncmds.c + * src/backend/commands/subscriptioncmds.c * *------------------------------------------------------------------------- */ diff --git a/src/backend/optimizer/util/appendinfo.c b/src/backend/optimizer/util/appendinfo.c index b8039c323b6..2f06fa743c2 100644 --- a/src/backend/optimizer/util/appendinfo.c +++ b/src/backend/optimizer/util/appendinfo.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * src/backend/optimizer/path/appendinfo.c + * src/backend/optimizer/util/appendinfo.c * *------------------------------------------------------------------------- */ diff --git a/src/backend/optimizer/util/inherit.c b/src/backend/optimizer/util/inherit.c index 8c5dc659474..7e134822f36 100644 --- a/src/backend/optimizer/util/inherit.c +++ b/src/backend/optimizer/util/inherit.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * src/backend/optimizer/path/inherit.c + * src/backend/optimizer/util/inherit.c * *------------------------------------------------------------------------- */ diff --git a/src/backend/replication/logical/logicalfuncs.c b/src/backend/replication/logical/logicalfuncs.c index 4f633888b4f..4d71e71f686 100644 --- a/src/backend/replication/logical/logicalfuncs.c +++ b/src/backend/replication/logical/logicalfuncs.c @@ -9,7 +9,7 @@ * Copyright (c) 2012-2022, PostgreSQL Global Development Group * * IDENTIFICATION - * src/backend/replication/logicalfuncs.c + * src/backend/replication/logical/logicalfuncs.c *------------------------------------------------------------------------- */ diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index d317a626e1e..19b2ba2000c 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * src/backend/replication/reorderbuffer.c + * src/backend/replication/logical/reorderbuffer.c * * NOTES * This module gets handed individual pieces of transactions in the order diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c index ab04e946bc2..83fca8a77d9 100644 --- a/src/backend/replication/logical/snapbuild.c +++ b/src/backend/replication/logical/snapbuild.c @@ -110,7 +110,7 @@ * Copyright (c) 2012-2022, PostgreSQL Global Development Group * * IDENTIFICATION - * src/backend/replication/snapbuild.c + * src/backend/replication/logical/snapbuild.c * *------------------------------------------------------------------------- */ diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c index c9af775bc18..d77bb32bb9e 100644 --- a/src/backend/replication/logical/worker.c +++ b/src/backend/replication/logical/worker.c @@ -2368,7 +2368,7 @@ apply_dispatch(StringInfo s) /* * Set the current command being applied. Since this function can be - * called recusively when applying spooled changes, save the current + * called recursively when applying spooled changes, save the current * command. */ saved_command = apply_error_callback_arg.command; @@ -2587,8 +2587,8 @@ LogicalRepApplyLoop(XLogRecPtr last_received) pgstat_report_activity(STATE_IDLE, NULL); /* - * Push apply error context callback. Fields will be filled during - * applying a change. + * Push apply error context callback. Fields will be filled while applying + * a change. */ errcallback.callback = apply_error_callback; errcallback.previous = error_context_stack; @@ -3608,7 +3608,7 @@ ApplyWorkerMain(Datum main_arg) } ereport(DEBUG1, - (errmsg("logical replication apply worker for subscription \"%s\" two_phase is %s.", + (errmsg("logical replication apply worker for subscription \"%s\" two_phase is %s", MySubscription->name, MySubscription->twophasestate == LOGICALREP_TWOPHASE_STATE_DISABLED ? "DISABLED" : MySubscription->twophasestate == LOGICALREP_TWOPHASE_STATE_PENDING ? "PENDING" : diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c index 87fe82ed114..ca48395d5c5 100644 --- a/src/backend/statistics/extended_stats.c +++ b/src/backend/statistics/extended_stats.c @@ -958,7 +958,7 @@ compare_datums_simple(Datum a, Datum b, SortSupport ssup) * build_attnums_array * Transforms a bitmap into an array of AttrNumber values. * - * This is used for extended statistics only, so all the attribute must be + * This is used for extended statistics only, so all the attributes must be * user-defined. That means offsetting by FirstLowInvalidHeapAttributeNumber * is not necessary here (and when querying the bitmap). */ diff --git a/src/backend/statistics/mcv.c b/src/backend/statistics/mcv.c index bad1787cfb2..1ef30344285 100644 --- a/src/backend/statistics/mcv.c +++ b/src/backend/statistics/mcv.c @@ -134,7 +134,7 @@ static int count_distinct_groups(int numrows, SortItem *items, * This bound is at most 25, and approaches 0 as n approaches 0 or N. The * case where n approaches 0 cannot happen in practice, since the sample * size is at least 300. The case where n approaches N corresponds to - * sampling the whole the table, in which case it is reasonable to keep + * sampling the whole table, in which case it is reasonable to keep * the whole MCV list (have no lower bound), so it makes sense to apply * this formula for all inputs, even though the above derivation is * technically only valid when the right hand side is at least around 10. @@ -295,7 +295,7 @@ statext_mcv_build(StatsBuildData *data, double totalrows, int stattarget) /* Copy the first chunk of groups into the result. */ for (i = 0; i < nitems; i++) { - /* just pointer to the proper place in the list */ + /* just point to the proper place in the list */ MCVItem *item = &mcvlist->items[i]; item->values = (Datum *) palloc(sizeof(Datum) * numattrs); @@ -556,7 +556,7 @@ build_column_frequencies(SortItem *groups, int ngroups, /* * statext_mcv_load - * Load the MCV list for the indicated pg_statistic_ext tuple. + * Load the MCV list for the indicated pg_statistic_ext_data tuple. */ MCVList * statext_mcv_load(Oid mvoid, bool inh) @@ -1620,7 +1620,7 @@ mcv_get_match_bitmap(PlannerInfo *root, List *clauses, Assert(mcvlist->nitems <= STATS_MCVLIST_MAX_ITEMS); matches = palloc(sizeof(bool) * mcvlist->nitems); - memset(matches, !is_or, sizeof(bool) * mcvlist->nitems); + memset(matches, !is_or, sizeof(bool) * mcvlist->nitems); /* * Loop through the list of clauses, and for each of them evaluate all the diff --git a/src/backend/storage/sync/sync.c b/src/backend/storage/sync/sync.c index 11fa17ddea2..543f691f2d2 100644 --- a/src/backend/storage/sync/sync.c +++ b/src/backend/storage/sync/sync.c @@ -274,7 +274,6 @@ SyncPostCheckpoint(void) } /* - * ProcessSyncRequests() -- Process queued fsync requests. */ void diff --git a/src/backend/utils/activity/backend_progress.c b/src/backend/utils/activity/backend_progress.c index e5958fa77c5..f29199725b7 100644 --- a/src/backend/utils/activity/backend_progress.c +++ b/src/backend/utils/activity/backend_progress.c @@ -1,11 +1,11 @@ /* ---------- - * progress.c + * backend_progress.c * * Command progress reporting infrastructure. * * Copyright (c) 2001-2022, PostgreSQL Global Development Group * - * src/backend/postmaster/progress.c + * src/backend/utils/activity/backend_progress.c * ---------- */ #include "postgres.h" diff --git a/src/backend/utils/activity/backend_status.c b/src/backend/utils/activity/backend_status.c index 2fecf26a2c3..c7ed1e6d7ac 100644 --- a/src/backend/utils/activity/backend_status.c +++ b/src/backend/utils/activity/backend_status.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * src/backend/postmaster/backend_status.c + * src/backend/utils/activity/backend_status.c * ---------- */ #include "postgres.h" diff --git a/src/backend/utils/activity/wait_event.c b/src/backend/utils/activity/wait_event.c index 021b83de7a3..60972c3a750 100644 --- a/src/backend/utils/activity/wait_event.c +++ b/src/backend/utils/activity/wait_event.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * src/backend/postmaster/wait_event.c + * src/backend/utils/activity/wait_event.c * * NOTES * |