On Sat, Mar 31, 2018 at 05:56:40AM -0500, Justin Pryzby wrote:
> I needed another distraction so bulk-checked for typos, limited to comments in
> *.[ch].
> 
> I'm not passionate about this, but it serves the purpose of reducing the
> overhead of fixing them individually.

I happened across this old patch, so ran this again to find new typos.

There's a few that I don't know how best to fix.

Heikki, do you remember what this means ?
+++ b/src/backend/catalog/storage.c
+ * NOTE: the list is kept in TopMemoryContext to be sure it won't disappear
+ * unbetimes.  It'd probably be OK to keep it in TopTransactionContext,
+ * but I'm being paranoid.

Pavel, I can't understand this one.
I guess s/producement/producing/ is too simple of a fix.
Please check my proposed language.
+XmlTableFetchRow(TableFuncScanState *state)
+        * XmlTable returns table - set of composite values. The error context, 
is
+        * used for producement more values, between two calls, there can be
+        * created and used another libxml2 error context. ...

Surafel, this typo existed twice in the original commit (357889eb1).
One instance was removed by Tom in 35cb574aa.  Should we simply fix the typo,
or borrow Julien/Tom's lanuage?
+       * Tuple at limit is needed for comparation in subsequent
+       * execution to detect ties.
>From fba47da46875c6c89a52225ac39f40e1993a9b56 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sun, 25 Oct 2020 13:56:19 -0500
Subject: [PATCH 1/6] bulk typos

Using same strategy as here
https://www.postgresql.org/message-id/20180331105640.GK28454%40telsasoft.com
---
 contrib/amcheck/verify_heapam.c                  | 2 +-
 src/backend/access/heap/pruneheap.c              | 2 +-
 src/backend/catalog/namespace.c                  | 2 +-
 src/backend/catalog/pg_namespace.c               | 2 +-
 src/backend/executor/execExpr.c                  | 2 +-
 src/backend/executor/nodeIncrementalSort.c       | 2 +-
 src/backend/optimizer/path/allpaths.c            | 2 +-
 src/backend/optimizer/plan/analyzejoins.c        | 2 +-
 src/backend/partitioning/partbounds.c            | 2 +-
 src/backend/postmaster/interrupt.c               | 2 +-
 src/backend/statistics/dependencies.c            | 2 +-
 src/backend/statistics/extended_stats.c          | 2 +-
 src/backend/storage/buffer/bufmgr.c              | 2 +-
 src/backend/utils/adt/varlena.c                  | 2 +-
 src/bin/pgbench/pgbench.c                        | 2 +-
 src/common/pg_lzcompress.c                       | 2 +-
 src/interfaces/libpq/fe-connect.c                | 2 +-
 src/test/modules/dummy_index_am/dummy_index_am.c | 2 +-
 18 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/contrib/amcheck/verify_heapam.c b/contrib/amcheck/verify_heapam.c
index 8bb890438a..dbe3134b6b 100644
--- a/contrib/amcheck/verify_heapam.c
+++ b/contrib/amcheck/verify_heapam.c
@@ -1342,7 +1342,7 @@ fxid_in_cached_range(FullTransactionId fxid, const HeapCheckContext *ctx)
 }
 
 /*
- * Checks wheter a multitransaction ID is in the cached valid range, returning
+ * Checks whether a multitransaction ID is in the cached valid range, returning
  * the nature of the range violation, if any.
  */
 static XidBoundsViolation
diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c
index bc510e2e9b..9e04bc712c 100644
--- a/src/backend/access/heap/pruneheap.c
+++ b/src/backend/access/heap/pruneheap.c
@@ -385,7 +385,7 @@ heap_page_prune(Relation relation, Buffer buffer,
 
 
 /*
- * Perform visiblity checks for heap pruning.
+ * Perform visibility checks for heap pruning.
  *
  * This is more complicated than just using GlobalVisTestIsRemovableXid()
  * because of old_snapshot_threshold. We only want to increase the threshold
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index 391a9b225d..740570c566 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -3853,7 +3853,7 @@ recomputeNamespacePath(void)
 	/*
 	 * We want to detect the case where the effective value of the base search
 	 * path variables didn't change.  As long as we're doing so, we can avoid
-	 * copying the OID list unncessarily.
+	 * copying the OID list unnecessarily.
 	 */
 	if (baseCreationNamespace == firstNS &&
 		baseTempCreationPending == temp_missing &&
diff --git a/src/backend/catalog/pg_namespace.c b/src/backend/catalog/pg_namespace.c
index ed85276070..7d2e26fd35 100644
--- a/src/backend/catalog/pg_namespace.c
+++ b/src/backend/catalog/pg_namespace.c
@@ -106,7 +106,7 @@ NamespaceCreate(const char *nspName, Oid ownerId, bool isTemp)
 	/* dependency on owner */
 	recordDependencyOnOwner(NamespaceRelationId, nspoid, ownerId);
 
-	/* dependences on roles mentioned in default ACL */
+	/* dependencies on roles mentioned in default ACL */
 	recordDependencyOnNewAcl(NamespaceRelationId, nspoid, 0, ownerId, nspacl);
 
 	/* dependency on extension ... but not for magic temp schemas */
diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c
index 868f8b0858..d76836c09b 100644
--- a/src/backend/executor/execExpr.c
+++ b/src/backend/executor/execExpr.c
@@ -3266,7 +3266,7 @@ ExecBuildAggTransCall(ExprState *state, AggState *aggstate,
 	 *
 	 * For ordered aggregates:
 	 *
-	 * Only need to choose between the faster path for a single orderred
+	 * Only need to choose between the faster path for a single ordered
 	 * column, and the one between multiple columns. Checking strictness etc
 	 * is done when finalizing the aggregate. See
 	 * process_ordered_aggregate_{single, multi} and
diff --git a/src/backend/executor/nodeIncrementalSort.c b/src/backend/executor/nodeIncrementalSort.c
index 6c0d24ee25..eb6cc19a60 100644
--- a/src/backend/executor/nodeIncrementalSort.c
+++ b/src/backend/executor/nodeIncrementalSort.c
@@ -1097,7 +1097,7 @@ ExecEndIncrementalSort(IncrementalSortState *node)
 	ExecClearTuple(node->ss.ss_ScanTupleSlot);
 	/* must drop pointer to sort result tuple */
 	ExecClearTuple(node->ss.ps.ps_ResultTupleSlot);
-	/* must drop stanalone tuple slots from outer node */
+	/* must drop standalone tuple slots from outer node */
 	ExecDropSingleTupleTableSlot(node->group_pivot);
 	ExecDropSingleTupleTableSlot(node->transfer_tuple);
 
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index b399592ff8..419ef0b7b5 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -2859,7 +2859,7 @@ generate_useful_gather_paths(PlannerInfo *root, RelOptInfo *rel, bool override_r
 
 			/*
 			 * If the path has no ordering at all, then we can't use either
-			 * incremental sort or rely on implict sorting with a gather
+			 * incremental sort or rely on implicit sorting with a gather
 			 * merge.
 			 */
 			if (subpath->pathkeys == NIL)
diff --git a/src/backend/optimizer/plan/analyzejoins.c b/src/backend/optimizer/plan/analyzejoins.c
index d0ff660284..806629fff2 100644
--- a/src/backend/optimizer/plan/analyzejoins.c
+++ b/src/backend/optimizer/plan/analyzejoins.c
@@ -371,7 +371,7 @@ remove_rel_from_query(PlannerInfo *root, int relid, Relids joinrelids)
 	 * Likewise remove references from PlaceHolderVar data structures,
 	 * removing any no-longer-needed placeholders entirely.
 	 *
-	 * Removal is a bit tricker than it might seem: we can remove PHVs that
+	 * Removal is a bit trickier than it might seem: we can remove PHVs that
 	 * are used at the target rel and/or in the join qual, but not those that
 	 * are used at join partner rels or above the join.  It's not that easy to
 	 * distinguish PHVs used at partner rels from those used in the join qual,
diff --git a/src/backend/partitioning/partbounds.c b/src/backend/partitioning/partbounds.c
index 66c42b5898..51a9bc0fef 100644
--- a/src/backend/partitioning/partbounds.c
+++ b/src/backend/partitioning/partbounds.c
@@ -1783,7 +1783,7 @@ merge_matching_partitions(PartitionMap *outer_map, PartitionMap *inner_map,
 	if (outer_merged_index >= 0 && inner_merged_index >= 0)
 	{
 		/*
-		 * If the mereged partitions are the same, no need to do anything;
+		 * If the merged partitions are the same, no need to do anything;
 		 * return the index of the merged partitions.  Otherwise, if each of
 		 * the given partitions has been merged with a dummy partition on the
 		 * other side, re-map them to either of the two merged partitions.
diff --git a/src/backend/postmaster/interrupt.c b/src/backend/postmaster/interrupt.c
index 3d02439b79..ee7dbf924a 100644
--- a/src/backend/postmaster/interrupt.c
+++ b/src/backend/postmaster/interrupt.c
@@ -92,7 +92,7 @@ SignalHandlerForCrashExit(SIGNAL_ARGS)
  * Simple signal handler for triggering a long-running background process to
  * shut down and exit.
  *
- * Typically, this handler would be used for SIGTERM, but some procesess use
+ * Typically, this handler would be used for SIGTERM, but some processes use
  * other signals. In particular, the checkpointer exits on SIGUSR2, the
  * stats collector on SIGQUIT, and the WAL writer exits on either SIGINT
  * or SIGTERM.
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index 4e30abb674..d950b4eabe 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -1305,7 +1305,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
 
 	/*
 	 * Work out which dependencies we can apply, starting with the
-	 * widest/stongest ones, and proceeding to smaller/weaker ones.
+	 * widest/strongest ones, and proceeding to smaller/weaker ones.
 	 */
 	dependencies = (MVDependency **) palloc(sizeof(MVDependency *) *
 											total_ndeps);
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index 9336f9bc5e..36326927c6 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -1403,7 +1403,7 @@ statext_mcv_clauselist_selectivity(PlannerInfo *root, List *clauses, int varReli
 		stat_sel = mcv_sel + other_sel;
 		CLAMP_PROBABILITY(stat_sel);
 
-		/* Factor the estimate from this MCV to the oveall estimate. */
+		/* Factor the estimate from this MCV to the overall estimate. */
 		sel *= stat_sel;
 	}
 
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 8f85ec2b74..ad91af4d56 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -560,7 +560,7 @@ PrefetchSharedBuffer(SMgrRelation smgr_reln,
  * could be used by the caller to avoid the need for a later buffer lookup, but
  * it's not pinned, so the caller must recheck it.
  *
- * 2.  If the kernel has been asked to initiate I/O, the initated_io member is
+ * 2.  If the kernel has been asked to initiate I/O, the initiated_io member is
  * true.  Currently there is no way to know if the data was already cached by
  * the kernel and therefore didn't really initiate I/O, and no way to know when
  * the I/O completes other than using synchronous ReadBuffer().
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index d7bc330541..5512e02940 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -6180,7 +6180,7 @@ unicode_normalize_func(PG_FUNCTION_ARGS)
 /*
  * Check whether the string is in the specified Unicode normalization form.
  *
- * This is done by convering the string to the specified normal form and then
+ * This is done by converting the string to the specified normal form and then
  * comparing that to the original string.  To speed that up, we also apply the
  * "quick check" algorithm specified in UAX #15, which can give a yes or no
  * answer for many strings by just scanning the string once.
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index cd39f23d5b..3057665bbe 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -4185,7 +4185,7 @@ runInitSteps(const char *initialize_steps)
 }
 
 /*
- * Extract pgbench table informations into global variables scale,
+ * Extract pgbench table information into global variables scale,
  * partition_method and partitions.
  */
 static void
diff --git a/src/common/pg_lzcompress.c b/src/common/pg_lzcompress.c
index d24d4803a9..72b4439ff2 100644
--- a/src/common/pg_lzcompress.c
+++ b/src/common/pg_lzcompress.c
@@ -734,7 +734,7 @@ pglz_decompress(const char *source, int32 slen, char *dest,
 				/*
 				 * Now we copy the bytes specified by the tag from OUTPUT to
 				 * OUTPUT (copy len bytes from dp - off to dp). The copied
-				 * areas could overlap, to preven possible uncertainty, we
+				 * areas could overlap, to prevent possible uncertainty, we
 				 * copy only non-overlapping regions.
 				 */
 				len = Min(len, destend - dp);
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index b0ca37c2ed..e7781d010f 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -7088,7 +7088,7 @@ pgpassfileWarning(PGconn *conn)
 }
 
 /*
- * Check if the SSL procotol value given in input is valid or not.
+ * Check if the SSL protocol value given in input is valid or not.
  * This is used as a sanity check routine for the connection parameters
  * ssl_min_protocol_version and ssl_max_protocol_version.
  */
diff --git a/src/test/modules/dummy_index_am/dummy_index_am.c b/src/test/modules/dummy_index_am/dummy_index_am.c
index e97a32d5be..8f4cdab1b3 100644
--- a/src/test/modules/dummy_index_am/dummy_index_am.c
+++ b/src/test/modules/dummy_index_am/dummy_index_am.c
@@ -153,7 +153,7 @@ dibuild(Relation heap, Relation index, IndexInfo *indexInfo)
 }
 
 /*
- * Build an empty index for the initialiation fork.
+ * Build an empty index for the initialization fork.
  */
 static void
 dibuildempty(Relation index)
-- 
2.17.0

>From eac42dd30e51eccfca817f5ecd92423aaf44ccff Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sun, 25 Oct 2020 12:32:30 -0500
Subject: [PATCH 2/6] s/rewinded/rewound/

---
 doc/src/sgml/ref/pg_rewind.sgml | 2 +-
 src/bin/pg_rewind/parsexlog.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml
index 688acdcb06..43282e6016 100644
--- a/doc/src/sgml/ref/pg_rewind.sgml
+++ b/doc/src/sgml/ref/pg_rewind.sgml
@@ -74,7 +74,7 @@ PostgreSQL documentation
    <application>pg_rewind</application> with the <literal>-c</literal> option to
    automatically retrieve them from the WAL archive. The use of
    <application>pg_rewind</application> is not limited to failover, e.g.,  a standby
-   server can be promoted, run some write transactions, and then rewinded
+   server can be promoted, run some write transactions, and then rewound
    to become a standby again.
   </para>
 
diff --git a/src/bin/pg_rewind/parsexlog.c b/src/bin/pg_rewind/parsexlog.c
index 2229c86f9a..a2f1ab5422 100644
--- a/src/bin/pg_rewind/parsexlog.c
+++ b/src/bin/pg_rewind/parsexlog.c
@@ -207,7 +207,7 @@ findLastCheckpoint(const char *datadir, XLogRecPtr forkptr, int tliIndex,
 		/*
 		 * Check if it is a checkpoint record. This checkpoint record needs to
 		 * be the latest checkpoint before WAL forked and not the checkpoint
-		 * where the primary has been stopped to be rewinded.
+		 * where the primary has been stopped to be rewound.
 		 */
 		info = XLogRecGetInfo(xlogreader) & ~XLR_INFO_MASK;
 		if (searchptr < forkptr &&
-- 
2.17.0

>From 1542a2580862b50cc52dc7b9619d2443fc64a3a8 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sun, 25 Oct 2020 13:40:59 -0500
Subject: [PATCH 3/6] comparison, but see also language changed at:
 35cb574aa84723f4661e9fc51340130e64cb5dfc

---
 src/backend/executor/nodeLimit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/executor/nodeLimit.c b/src/backend/executor/nodeLimit.c
index d85cf7d93e..c5896e5790 100644
--- a/src/backend/executor/nodeLimit.c
+++ b/src/backend/executor/nodeLimit.c
@@ -105,7 +105,7 @@ ExecLimit(PlanState *pstate)
 				}
 
 				/*
-				 * Tuple at limit is needed for comparation in subsequent
+				 * Tuple at limit is needed for comparison in subsequent
 				 * execution to detect ties.
 				 */
 				if (node->limitOption == LIMIT_OPTION_WITH_TIES &&
-- 
2.17.0

>From c0796d0d8bb1bf13de03ab523a12d28f99d6a3d0 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sun, 25 Oct 2020 13:53:08 -0500
Subject: [PATCH 4/6] producement?  fcec6caafa2346b6c9d3ad5065e417733bd63cd9

---
 src/backend/utils/adt/xml.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c
index 4c299057a6..3c2b1fecd3 100644
--- a/src/backend/utils/adt/xml.c
+++ b/src/backend/utils/adt/xml.c
@@ -4535,11 +4535,11 @@ XmlTableFetchRow(TableFuncScanState *state)
 	xtCxt = GetXmlTableBuilderPrivateData(state, "XmlTableFetchRow");
 
 	/*
-	 * XmlTable returns table - set of composite values. The error context, is
-	 * used for producement more values, between two calls, there can be
-	 * created and used another libxml2 error context. It is libxml2 global
-	 * value, so it should be refreshed any time before any libxml2 usage,
-	 * that is finished by returning some value.
+	 * XmlTable returns table-set of composite values. The error context is
+	 * used for providing more detail. Between two calls, other libxml2
+	 * error contexts might have been created and used ; since they're libxml2 
+	 * global values, they should be refreshed each time before any libxml2 usage
+	 * that finishes by returning some value.
 	 */
 	xmlSetStructuredErrorFunc((void *) xtCxt->xmlerrcxt, xml_errorHandler);
 
-- 
2.17.0

>From b41983e934b7126a2f4c28ab4db1437275a8571d Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sun, 25 Oct 2020 13:55:08 -0500
Subject: [PATCH 5/6] unbetimes???  maybe untimely??
 3396000684b41e7e9467d1abc67152b39e697035

---
 src/backend/catalog/storage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/catalog/storage.c b/src/backend/catalog/storage.c
index 95a5be0b44..0aa150dbd5 100644
--- a/src/backend/catalog/storage.c
+++ b/src/backend/catalog/storage.c
@@ -53,7 +53,7 @@ int			wal_skip_threshold = 2048;	/* in kilobytes */
  * nesting level.
  *
  * NOTE: the list is kept in TopMemoryContext to be sure it won't disappear
- * unbetimes.  It'd probably be OK to keep it in TopTransactionContext,
+ * unbetimes???.  It'd probably be OK to keep it in TopTransactionContext,
  * but I'm being paranoid.
  */
 
-- 
2.17.0

>From 53e09bbda2ca94ec5e67c5d0ff905b16499bb76c Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sun, 25 Oct 2020 14:27:57 -0500
Subject: [PATCH 6/6] More likely to be less likely

---
 src/backend/commands/copy.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index 36ddcdccdb..a84a2e6091 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -2610,9 +2610,9 @@ CopyMultiInsertInfoFlush(CopyMultiInsertInfo *miinfo, ResultRelInfo *curr_rri)
 
 	/*
 	 * Trim the list of tracked buffers down if it exceeds the limit.  Here we
-	 * remove buffers starting with the ones we created first.  It seems more
-	 * likely that these older ones are less likely to be needed than ones
-	 * that were just created.
+	 * remove buffers starting with the ones we created first.  It seems less
+	 * likely that these older ones will be needed than ones that were just
+	 * created.
 	 */
 	while (list_length(miinfo->multiInsertBuffers) > MAX_PARTITION_BUFFERS)
 	{
-- 
2.17.0

Reply via email to