bulk typos

Started by Justin Pryzbyalmost 8 years ago10 messages
#1Justin Pryzby
pryzby@telsasoft.com
1 attachment(s)

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.

Also I heard something here recently about ugly languages..
time find . -name '*.c' -print0 |xargs -r0 sed -s '/.*\/\*/!d; s///; :l; /\*\/.*/!{N;b l}; s///; s/.*/\L&/' |grep -Eo '[[:alpha:]]{3,}' |sort |uniq -c |sort -nr |awk '$1==1{print $2}' |grep -xFvf /usr/share/dict/words |less

If any of these are disputed or objectionable, I would summarily discard them,
as I'm sure I missed some and fixing every last typo wasn't really the ghoul.

Justin

Attachments:

postgres-typostext/plain; charset=us-asciiDownload
diff --git a/contrib/pgcrypto/rijndael.c b/contrib/pgcrypto/rijndael.c
index 4c074ef..6938701 100644
--- a/contrib/pgcrypto/rijndael.c
+++ b/contrib/pgcrypto/rijndael.c
@@ -163,7 +163,7 @@ gen_tabs(void)
 				q;
 
 	/* log and power tables for GF(2**8) finite field with	*/
-	/* 0x11b as modular polynomial - the simplest prmitive	*/
+	/* 0x11b as modular polynomial - the simplest primitive	*/
 	/* root is 0x11, used here to generate the tables		*/
 
 	for (i = 0, p = 1; i < 256; ++i)
diff --git a/src/backend/access/common/session.c b/src/backend/access/common/session.c
index 617c3e1..ffa7432 100644
--- a/src/backend/access/common/session.c
+++ b/src/backend/access/common/session.c
@@ -60,7 +60,7 @@ InitializeSession(void)
  * Initialize the per-session DSM segment if it isn't already initialized, and
  * return its handle so that worker processes can attach to it.
  *
- * Unlike the per-context DSM segment, this segement and its contents are
+ * Unlike the per-context DSM segment, this segment and its contents are
  * reused for future parallel queries.
  *
  * Return DSM_HANDLE_INVALID if a segment can't be allocated due to lack of
diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c
index e85abcf..4011199 100644
--- a/src/backend/access/nbtree/nbtinsert.c
+++ b/src/backend/access/nbtree/nbtinsert.c
@@ -187,9 +187,9 @@ top:
 				_bt_relbuf(rel, buf);
 
 				/*
-				 * Something did not workout. Just forget about the cached
+				 * Something did not work out. Just forget about the cached
 				 * block and follow the normal path. It might be set again if
-				 * the conditions are favourble.
+				 * the conditions are favourable.
 				 */
 				RelationSetTargetBlock(rel, InvalidBlockNumber);
 			}
diff --git a/src/backend/executor/execProcnode.c b/src/backend/executor/execProcnode.c
index 43a27a9..a3fb449 100644
--- a/src/backend/executor/execProcnode.c
+++ b/src/backend/executor/execProcnode.c
@@ -409,7 +409,7 @@ ExecSetExecProcNode(PlanState *node, ExecProcNodeMtd function)
 	 * Add a wrapper around the ExecProcNode callback that checks stack depth
 	 * during the first execution and maybe adds an instrumentation
 	 * wrapper. When the callback is changed after execution has already begun
-	 * that means we'll superflously execute ExecProcNodeFirst, but that seems
+	 * that means we'll superfluously execute ExecProcNodeFirst, but that seems
 	 * ok.
 	 */
 	node->ExecProcNodeReal = function;
diff --git a/src/backend/jit/llvm/llvmjit_expr.c b/src/backend/jit/llvm/llvmjit_expr.c
index 0d8c2bd..f37ff82 100644
--- a/src/backend/jit/llvm/llvmjit_expr.c
+++ b/src/backend/jit/llvm/llvmjit_expr.c
@@ -1768,7 +1768,7 @@ llvm_compile_expr(ExprState *state)
 									b_compare_result,
 									b_null);
 
-					/* build block analying the !NULL comparator result */
+					/* build block analyzing the !NULL comparator result */
 					LLVMPositionBuilderAtEnd(b, b_compare_result);
 
 					/* if results equal, compare next, otherwise done */
diff --git a/src/backend/optimizer/geqo/geqo_misc.c b/src/backend/optimizer/geqo/geqo_misc.c
index 919d288..0f96912 100644
--- a/src/backend/optimizer/geqo/geqo_misc.c
+++ b/src/backend/optimizer/geqo/geqo_misc.c
@@ -92,7 +92,7 @@ print_gen(FILE *fp, Pool *pool, int generation)
 {
 	int			lowest;
 
-	/* Get index to lowest ranking gene in poplulation. */
+	/* Get index to lowest ranking gene in population. */
 	/* Use 2nd to last since last is buffer. */
 	lowest = pool->size > 1 ? pool->size - 2 : 0;
 
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 60e2f21..e3c5d4e 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -6721,7 +6721,7 @@ create_partial_grouping_paths(PlannerInfo *root,
  * Gather Merge.
  *
  * NB: This function shouldn't be used for anything other than a grouped or
- * partially grouped relation not only because of the fact that it explcitly
+ * partially grouped relation not only because of the fact that it expilcitly
  * references group_pathkeys but we pass "true" as the third argument to
  * generate_gather_paths().
  */
@@ -6839,7 +6839,7 @@ apply_scanjoin_target_to_paths(PlannerInfo *root,
 	 */
 	rel->reltarget = llast_node(PathTarget, scanjoin_targets);
 
-	/* Special case: handly dummy relations separately. */
+	/* Special case: handle dummy relations separately. */
 	if (IS_DUMMY_REL(rel))
 	{
 		/*
diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c
index 361bde4..88140bc 100644
--- a/src/backend/rewrite/rewriteHandler.c
+++ b/src/backend/rewrite/rewriteHandler.c
@@ -710,7 +710,7 @@ adjustJoinTreeList(Query *parsetree, bool removert, int rt_index)
  * using the parent relation as reference.  It must not do anything that
  * will not be correct when transposed to the child relation(s).  (Step 4
  * is incorrect by this light, since child relations might have different
- * colun ordering, but the planner will fix things by re-sorting the tlist
+ * column ordering, but the planner will fix things by re-sorting the tlist
  * for each child.)
  */
 static List *
diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c
index 726db7b..fc0a9c0 100644
--- a/src/backend/storage/ipc/ipc.c
+++ b/src/backend/storage/ipc/ipc.c
@@ -374,7 +374,7 @@ on_shmem_exit(pg_on_exit_callback function, Datum arg)
 /* ----------------------------------------------------------------
  *		cancel_before_shmem_exit
  *
- *		this function removes a previously-registed before_shmem_exit
+ *		this function removes a previously-registered before_shmem_exit
  *		callback.  For simplicity, only the latest entry can be
  *		removed.  (We could work harder but there is no need for
  *		current uses.)
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 6f30e08..776b9c5 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -1327,7 +1327,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
 					 * There's a race condition here: once we release the
 					 * ProcArrayLock, it's possible for the autovac worker to
 					 * close up shop and exit before we can do the kill().
-					 * Therefore, we do not whinge about no-such-process.
+					 * Therefore, we do not whine about no-such-process.
 					 * Other errors such as EPERM could conceivably happen if
 					 * the kernel recycles the PID fast enough, but such cases
 					 * seem improbable enough that it's probably best to issue
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c
index fa78451..805a1a0 100644
--- a/src/backend/utils/adt/jsonfuncs.c
+++ b/src/backend/utils/adt/jsonfuncs.c
@@ -1172,7 +1172,7 @@ get_object_field_end(void *state, char *fname, bool isnull)
 	if (get_last && _state->result_start != NULL)
 	{
 		/*
-		 * make a text object from the string from the prevously noted json
+		 * make a text object from the string from the previously noted json
 		 * start up to the end of the previous token (the lexer is by now
 		 * ahead of us on whatever came after what we're interested in).
 		 */
diff --git a/src/backend/utils/adt/oracle_compat.c b/src/backend/utils/adt/oracle_compat.c
index 331c185..c827001 100644
--- a/src/backend/utils/adt/oracle_compat.c
+++ b/src/backend/utils/adt/oracle_compat.c
@@ -912,7 +912,7 @@ ascii(PG_FUNCTION_ARGS)
  *
  *	Returns the character having the binary equivalent to val.
  *
- * For UTF8 we treat the argumwent as a Unicode code point.
+ * For UTF8 we treat the argument as a Unicode code point.
  * For other multi-byte encodings we raise an error for arguments
  * outside the strict ASCII range (1..127).
  *
diff --git a/src/backend/utils/mmgr/dsa.c b/src/backend/utils/mmgr/dsa.c
index c2b1310..f329fdd 100644
--- a/src/backend/utils/mmgr/dsa.c
+++ b/src/backend/utils/mmgr/dsa.c
@@ -649,7 +649,7 @@ dsa_pin_mapping(dsa_area *area)
  * will result in an ERROR.
  *
  * DSA_ALLOC_NO_OOM causes this function to return InvalidDsaPointer when
- * no memory is available or a size limit establed by set_dsa_size_limit
+ * no memory is available or a size limit established by set_dsa_size_limit
  * would be exceeded.  Otherwise, such allocations will result in an ERROR.
  *
  * DSA_ALLOC_ZERO causes the allocated memory to be zeroed.  Otherwise, the
diff --git a/src/backend/utils/sort/sharedtuplestore.c b/src/backend/utils/sort/sharedtuplestore.c
index e453cc0..3e47fbd 100644
--- a/src/backend/utils/sort/sharedtuplestore.c
+++ b/src/backend/utils/sort/sharedtuplestore.c
@@ -386,7 +386,7 @@ sts_puttuple(SharedTuplestoreAccessor *accessor, void *meta_data,
 				sts_flush_chunk(accessor);
 
 				/*
-				 * How many oveflow chunks to go?  This will allow readers to
+				 * How many overflow chunks to go?  This will allow readers to
 				 * skip all of them at once instead of reading each one.
 				 */
 				accessor->write_chunk->overflow = (size + STS_CHUNK_DATA_SIZE - 1) /
diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c
index 53e4661..0866395 100644
--- a/src/bin/pg_basebackup/pg_recvlogical.c
+++ b/src/bin/pg_basebackup/pg_recvlogical.c
@@ -121,7 +121,7 @@ sendFeedback(PGconn *conn, TimestampTz now, bool force, bool replyRequested)
 	int			len = 0;
 
 	/*
-	 * we normally don't want to send superfluous feedbacks, but if it's
+	 * we normally don't want to send superfluous feedback, but if it's
 	 * because of a timeout we need to, otherwise wal_sender_timeout will kill
 	 * us.
 	 */
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index b8d65a9..64cde32 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -811,7 +811,7 @@ main(int argc, char **argv)
 	/*
 	 * In binary-upgrade mode, we do not have to worry about the actual blob
 	 * data or the associated metadata that resides in the pg_largeobject and
-	 * pg_largeobject_metadata tables, respectivly.
+	 * pg_largeobject_metadata tables, respectively.
 	 *
 	 * However, we do need to collect blob information as there may be
 	 * comments or other information on blobs that we do need to dump out.
diff --git a/src/bin/psql/crosstabview.h b/src/bin/psql/crosstabview.h
index 596637f..54ddcc3 100644
--- a/src/bin/psql/crosstabview.h
+++ b/src/bin/psql/crosstabview.h
@@ -17,7 +17,7 @@
  * too much time if the crosstab to generate happens to be unreasonably large
  * (worst case: a NxN cartesian product with N=number of tuples).
  * The value of 1600 corresponds to the maximum columns per table in storage,
- * but it could be as much as INT_MAX theorically.
+ * but it could be as much as INT_MAX theoretically.
  */
 #define CROSSTABVIEW_MAX_COLUMNS 1600
 
diff --git a/src/include/access/hash.h b/src/include/access/hash.h
index 65d23f3..f94bcf9 100644
--- a/src/include/access/hash.h
+++ b/src/include/access/hash.h
@@ -239,7 +239,7 @@ typedef HashScanOpaqueData *HashScanOpaque;
 #define HASH_SPLITPOINT_PHASE_MASK		(HASH_SPLITPOINT_PHASES_PER_GRP - 1)
 #define HASH_SPLITPOINT_GROUPS_WITH_ONE_PHASE	10
 
-/* defines max number of splitpoit phases a hash index can have */
+/* defines max number of splitpoint phases a hash index can have */
 #define HASH_MAX_SPLITPOINT_GROUP	32
 #define HASH_MAX_SPLITPOINTS \
 	(((HASH_MAX_SPLITPOINT_GROUP - HASH_SPLITPOINT_GROUPS_WITH_ONE_PHASE) * \
diff --git a/src/include/executor/hashjoin.h b/src/include/executor/hashjoin.h
index 6fb2dc0..a9f9872 100644
--- a/src/include/executor/hashjoin.h
+++ b/src/include/executor/hashjoin.h
@@ -190,7 +190,7 @@ typedef struct ParallelHashJoinBatch
 
 /*
  * Each backend requires a small amount of per-batch state to interact with
- * each ParalellHashJoinBatch.
+ * each ParallelHashJoinBatch.
  */
 typedef struct ParallelHashJoinBatchAccessor
 {
@@ -201,7 +201,7 @@ typedef struct ParallelHashJoinBatchAccessor
 	size_t		ntuples;		/* number of tuples */
 	size_t		size;			/* size of partition in memory */
 	size_t		estimated_size; /* size of partition on disk */
-	size_t		old_ntuples;	/* how many tuples before repartioning? */
+	size_t		old_ntuples;	/* how many tuples before repartitioning? */
 	bool		at_least_one_chunk; /* has this backend allocated a chunk? */
 
 	bool		done;			/* flag to remember that a batch is done */
diff --git a/src/include/executor/nodeAgg.h b/src/include/executor/nodeAgg.h
index 4650dc2..ab55be8 100644
--- a/src/include/executor/nodeAgg.h
+++ b/src/include/executor/nodeAgg.h
@@ -104,7 +104,7 @@ typedef struct AggStatePerTransData
 	/*
 	 * Comparators for input columns --- only set/used when aggregate has
 	 * DISTINCT flag. equalfnOne version is used for single-column
-	 * commparisons, equalfnMulti for the case of multiple columns.
+	 * comparisons, equalfnMulti for the case of multiple columns.
 	 */
 	FmgrInfo	equalfnOne;
 	ExprState  *equalfnMulti;
diff --git a/src/include/executor/tablefunc.h b/src/include/executor/tablefunc.h
index 29c546f..52424ae 100644
--- a/src/include/executor/tablefunc.h
+++ b/src/include/executor/tablefunc.h
@@ -47,7 +47,7 @@ struct TableFuncScanState;
  *
  * DestroyBuilder shall release all resources associated with a table builder
  * context.  It may be called either because all rows have been consumed, or
- * because an error ocurred while processing the table expression.
+ * because an error occurred while processing the table expression.
  */
 typedef struct TableFuncRoutine
 {
diff --git a/src/include/jit/jit.h b/src/include/jit/jit.h
index 85d234f..ddeffae 100644
--- a/src/include/jit/jit.h
+++ b/src/include/jit/jit.h
@@ -15,7 +15,7 @@
 #include "utils/resowner.h"
 
 
-/* Flags deterimining what kind of JIT operations to perform */
+/* Flags determining what kind of JIT operations to perform */
 #define PGJIT_NONE     0
 #define PGJIT_PERFORM  1 << 0
 #define PGJIT_OPT3     1 << 1
diff --git a/src/include/jit/llvmjit.h b/src/include/jit/llvmjit.h
index dc8fa57..b0093db 100644
--- a/src/include/jit/llvmjit.h
+++ b/src/include/jit/llvmjit.h
@@ -107,7 +107,7 @@ extern void llvm_inline(LLVMModuleRef mod);
 
 /*
  ****************************************************************************
- * Code ceneration functions.
+ * Code generation functions.
  ****************************************************************************
  */
 extern bool llvm_compile_expr(struct ExprState *state);
diff --git a/src/include/lib/dshash.h b/src/include/lib/dshash.h
index 3f8086e..8c733bf 100644
--- a/src/include/lib/dshash.h
+++ b/src/include/lib/dshash.h
@@ -42,7 +42,7 @@ typedef dshash_hash (*dshash_hash_function) (const void *v, size_t size,
  * Compare and hash functions must be supplied even when attaching, because we
  * can't safely share function pointers between backends in general.  Either
  * the arg variants or the non-arg variants should be supplied; the other
- * function pointers should be NULL.  If the arg varants are supplied then the
+ * function pointers should be NULL.  If the arg variants are supplied then the
  * user data pointer supplied to the create and attach functions will be
  * passed to the hash and compare functions.
  */
diff --git a/src/include/mb/pg_wchar.h b/src/include/mb/pg_wchar.h
index 1d26cb5..748db5b 100644
--- a/src/include/mb/pg_wchar.h
+++ b/src/include/mb/pg_wchar.h
@@ -410,7 +410,7 @@ extern const pg_wchar_tbl pg_wchar_table[];
  * points to a lookup table for the second byte. And so on.
  *
  * Physically, all the trees are stored in one big array, in 'chars16' or
- * 'chars32', depending on the maximum value that needs to be reprented. For
+ * 'chars32', depending on the maximum value that needs to be represented. For
  * each level in each tree, we also store lower and upper bound of allowed
  * values - values outside those bounds are considered invalid, and are left
  * out of the tables.
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -1444,7 +1447,7 @@ typedef JoinPath NestPath;
  * that the executor need find only one match per outer tuple, and that the
  * mergeclauses are sufficient to identify a match.  In such cases the
  * executor can immediately advance the outer relation after processing a
- * match, and therefoere it need never back up the inner relation.
+ * match, and therefore it need never back up the inner relation.
  *
  * materialize_inner is true if a Material node should be placed atop the
  * inner input.  This may appear with or without an inner Sort step.
diff --git a/src/include/port.h b/src/include/port.h
index a514ab7..74a9dc4 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -347,7 +347,7 @@ extern int	isinf(double x);
 /*
  * Glibc doesn't use the builtin for clang due to a *gcc* bug in a version
  * newer than the gcc compatibility clang claims to have. This would cause a
- * *lot* of superflous function calls, therefore revert when using clang.
+ * *lot* of superfluous function calls, therefore revert when using clang.
  */
 #ifdef __clang__
 /* needs to be separate to not confuse other compilers */
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c
index bb2bef1..b43b362 100644
--- a/src/interfaces/ecpg/ecpglib/data.c
+++ b/src/interfaces/ecpg/ecpglib/data.c
@@ -471,7 +471,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
 								memcpy(str, pval, size);
 								str[varcharsize-1] = '\0';
 
-								/* compatiblity mode empty string gets -1 indicator but no warning */
+								/* compatibility mode empty string gets -1 indicator but no warning */
 								if (size == 0) {
 									/* truncation */
 									switch (ind_type)
diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c
index 6146a3c..0510f52 100644
--- a/src/interfaces/ecpg/pgtypeslib/interval.c
+++ b/src/interfaces/ecpg/pgtypeslib/interval.c
@@ -316,7 +316,7 @@ DecodeISO8601Interval(char *str,
  *	  places where DecodeTime is called; and added
  *		 int range = INTERVAL_FULL_RANGE;
  *
- *	* ECPG semes not to have a global IntervalStyle
+ *	* ECPG seems not to have a global IntervalStyle
  *	  so added
  *		int IntervalStyle = INTSTYLE_POSTGRES;
  */
diff --git a/src/pl/plpython/plpy_util.c b/src/pl/plpython/plpy_util.c
index 51e2461..2128acb 100644
--- a/src/pl/plpython/plpy_util.c
+++ b/src/pl/plpython/plpy_util.c
@@ -84,7 +84,7 @@ PLyUnicode_Bytes(PyObject *unicode)
  * function.  The result is palloc'ed.
  *
  * Note that this function is disguised as PyString_AsString() when
- * using Python 3.  That function retuns a pointer into the internal
+ * using Python 3.  That function returns a pointer into the internal
  * memory of the argument, which isn't exactly the interface of this
  * function.  But in either case you get a rather short-lived
  * reference that you ought to better leave alone.
#2Félix GERZAGUET
felix.gerzaguet@gmail.com
In reply to: Justin Pryzby (#1)
Re: bulk typos

On Sat, Mar 31, 2018 at 12:56 PM, Justin Pryzby <pryzby@telsasoft.com>
wrote:

I needed another distraction so bulk-checked for typos, limited to
comments in
*.[ch].

I think you introduced another one while changing "explcitly" to
"expilcitly" instead of "explicitly" :-)

--
Félix

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Félix GERZAGUET (#2)
Re: bulk typos

=?UTF-8?Q?F=C3=A9lix_GERZAGUET?= <felix.gerzaguet@gmail.com> writes:

On Sat, Mar 31, 2018 at 12:56 PM, Justin Pryzby <pryzby@telsasoft.com>
wrote:

I needed another distraction so bulk-checked for typos, limited to
comments in *.[ch].

I think you introduced another one while changing "explcitly" to
"expilcitly" instead of "explicitly" :-)

LGTM for the most part, except for this change:

-                     * Therefore, we do not whinge about no-such-process.
+                     * Therefore, we do not whine about no-such-process.

I think that spelling is intentional, so I didn't change it.
Pushed the rest, with Felix's correction.

regards, tom lane

#4Andres Freund
andres@anarazel.de
In reply to: Justin Pryzby (#1)
Re: bulk typos

Hi,

On 2018-03-31 05:56:40 -0500, Justin Pryzby wrote:

--- a/src/backend/jit/llvm/llvmjit_expr.c
+++ b/src/backend/jit/llvm/llvmjit_expr.c
@@ -1768,7 +1768,7 @@ llvm_compile_expr(ExprState *state)
b_compare_result,
b_null);
-					/* build block analying the !NULL comparator result */
+					/* build block analyzing the !NULL comparator result */
LLVMPositionBuilderAtEnd(b, b_compare_result);

Hah. I kinda like the previous way too ;)

Greetings,

Andres Freund

#5Gavin Flower
GavinFlower@archidevsys.co.nz
In reply to: Tom Lane (#3)
Re: bulk typos

On 02/04/18 07:03, Tom Lane wrote:

=?UTF-8?Q?F=C3=A9lix_GERZAGUET?= <felix.gerzaguet@gmail.com> writes:

On Sat, Mar 31, 2018 at 12:56 PM, Justin Pryzby <pryzby@telsasoft.com>
wrote:

I needed another distraction so bulk-checked for typos, limited to
comments in *.[ch].

I think you introduced another one while changing "explcitly" to
"expilcitly" instead of "explicitly" :-)

LGTM for the most part, except for this change:

-                     * Therefore, we do not whinge about no-such-process.
+                     * Therefore, we do not whine about no-such-process.

I think that spelling is intentional, so I didn't change it.
Pushed the rest, with Felix's correction.

regards, tom lane

Me thinks some people are Whinging far too much!

see: https://en.oxforddictionaries.com/definition/whinge

Cheers,
Gavin

#6Justin Pryzby
pryzby@telsasoft.com
In reply to: Justin Pryzby (#1)
6 attachment(s)
Re: bulk typos

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.

Attachments:

0001-bulk-typos.patchtext/x-diff; charset=us-asciiDownload
From fba47da46875c6c89a52225ac39f40e1993a9b56 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@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

0002-s-rewinded-rewound.patchtext/x-diff; charset=us-asciiDownload
From eac42dd30e51eccfca817f5ecd92423aaf44ccff Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@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

0003-comparison-but-see-also-language-changed-at-35cb574a.patchtext/x-diff; charset=us-asciiDownload
From 1542a2580862b50cc52dc7b9619d2443fc64a3a8 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@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

0004-producement-fcec6caafa2346b6c9d3ad5065e417733bd63cd9.patchtext/x-diff; charset=us-asciiDownload
From c0796d0d8bb1bf13de03ab523a12d28f99d6a3d0 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@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

0005-unbetimes-maybe-untimely-3396000684b41e7e9467d1abc67.patchtext/x-diff; charset=us-asciiDownload
From b41983e934b7126a2f4c28ab4db1437275a8571d Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@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

0006-More-likely-to-be-less-likely.patchtext/x-diff; charset=us-asciiDownload
From 53e09bbda2ca94ec5e67c5d0ff905b16499bb76c Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@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

#7Heikki Linnakangas
hlinnaka@iki.fi
In reply to: Justin Pryzby (#6)
Re: bulk typos

On 25/10/2020 21:48, Justin Pryzby wrote:

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.

Nice script.

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.

Heh, even though I was the last one to touch that line according to git
blame, I just moved it from smgr.c. Looks like Tom wrote it in 2004. I
guess it means "too early". That would make sense from the context.
Google only gives a few hits but they seem to agree with "too early". A
very rare word, for sure. Might be good to change it to "too early", but
it's not wrong, and the poet in me kind of likes "unbetimes" :-).

- Heikki

#8Tom Lane
tgl@sss.pgh.pa.us
In reply to: Heikki Linnakangas (#7)
Re: bulk typos

Heikki Linnakangas <hlinnaka@iki.fi> writes:

On 25/10/2020 21:48, Justin Pryzby wrote:

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.

Heh, even though I was the last one to touch that line according to git
blame, I just moved it from smgr.c. Looks like Tom wrote it in 2004. I
guess it means "too early". That would make sense from the context.

Sorry about that, I was being a little whimsical I suppose.

Doing a bit of research, I see the OED defines "betimes" as

[archaic] Before the usual or expected time; early.
‘next morning I was up betimes’

"unbetimes" doesn't seem to be a recognized word ... and now that I look
at this, if it did exist it would mean "too late" which is backwards.

I'd suggest "untimely" if you want to wax poetic, or "too soon" if
you prefer prose that plods.

regards, tom lane

#9Justin Pryzby
pryzby@telsasoft.com
In reply to: Justin Pryzby (#6)
7 attachment(s)
Re: bulk typos

On Sun, Oct 25, 2020 at 02:48:49PM -0500, Justin Pryzby wrote:

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.

I've added a few more, but still not sure about these two.

Show quoted text
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.

Attachments:

0001-pgindent-typos.patchtext/x-diff; charset=us-asciiDownload
From 5b5fec23af33b25f261a875dcd26c60564df0d89 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Oct 2020 18:28:36 -0500
Subject: [PATCH] pgindent typos

Note that there's two changes to one line in lexi.c
---
 io.c   | 4 ++--
 lexi.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/io.c b/io.c
index fbaa5dd..a4812b6 100644
--- a/io.c
+++ b/io.c
@@ -452,8 +452,8 @@ fill_buffer(void)
  *
  * ALGORITHM: Put tabs and/or blanks into pobuf, then write pobuf.
  *
- * PARAMETERS: current		integer		The current column target
- * nteger		The desired column
+ * PARAMETERS: current		integer		The current column
+ * target                       integer		The desired column
  *
  * RETURNS: Integer value of the new column.  (If current >= target, no action is
  * taken, and current is returned.
diff --git a/lexi.c b/lexi.c
index d43723c..f01596a 100644
--- a/lexi.c
+++ b/lexi.c
@@ -442,7 +442,7 @@ lexi(struct parser_state *state)
 					 * then following sign is unary */
 	    state->last_u_d = true;	/* will make "int a -1" work */
 	return (ident);		/* the ident is not in the list */
-    }				/* end of procesing for alpanum character */
+    }				/* end of processing for alphanum character */
 
     /* Scan a non-alphanumeric token */
 
-- 
2.17.0

v2-0001-bulk-typos.patchtext/x-diff; charset=us-asciiDownload
From c0f112b0c9a1c4007a8562269b36f1fa21ee5a07 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Oct 2020 13:56:19 -0500
Subject: [PATCH v2 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/catalog/storage.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 +-
 19 files changed, 19 insertions(+), 19 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/catalog/storage.c b/src/backend/catalog/storage.c
index 6e17e0756c..524e7039e1 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,
+ * too soon.  It'd probably be OK to keep it in TopTransactionContext,
  * but I'm being paranoid.
  */
 
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 a4f97c10fe..ac0c495972 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 c58f67ef23..0c965fb9d0 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

v2-0002-s-rewinded-rewound.patchtext/x-diff; charset=us-asciiDownload
From 2e2e3934c7f1c9096d8c443fcf25a61783b2f5fa Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Oct 2020 12:32:30 -0500
Subject: [PATCH v2 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

v2-0003-others.patchtext/x-diff; charset=us-asciiDownload
From 2b2a27c5a40b915b0ee38c4c9a0ca4f4982c3f0f Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Oct 2020 17:38:29 -0500
Subject: [PATCH v2 3/6] others

---
 contrib/amcheck/verify_heapam.c  | 2 +-
 contrib/pgcrypto/pgp-compress.c  | 2 +-
 doc/src/sgml/auto-explain.sgml   | 2 +-
 doc/src/sgml/ddl.sgml            | 2 +-
 src/backend/commands/tablecmds.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/amcheck/verify_heapam.c b/contrib/amcheck/verify_heapam.c
index dbe3134b6b..570f44b59e 100644
--- a/contrib/amcheck/verify_heapam.c
+++ b/contrib/amcheck/verify_heapam.c
@@ -560,7 +560,7 @@ verify_heapam_tupdesc(void)
  * Since we do not hold a snapshot, tuple visibility is not a question of
  * whether we should be able to see the tuple relative to any particular
  * snapshot, but rather a question of whether it is safe and reasonable to
- * to check the tuple attributes.
+ * check the tuple attributes.
  *
  * Some kinds of corruption make it unsafe to check the tuple attributes, for
  * example when the line pointer refers to a range of bytes outside the page.
diff --git a/contrib/pgcrypto/pgp-compress.c b/contrib/pgcrypto/pgp-compress.c
index 7e8ddba187..086bec31ae 100644
--- a/contrib/pgcrypto/pgp-compress.c
+++ b/contrib/pgcrypto/pgp-compress.c
@@ -291,7 +291,7 @@ restart:
 		 * A stream must be terminated by a normal packet.  If the last stream
 		 * packet in the source stream is a full packet, a normal empty packet
 		 * must follow.  Since the underlying packet reader doesn't know that
-		 * the compressed stream has been ended, we need to to consume the
+		 * the compressed stream has been ended, we need to consume the
 		 * terminating packet here.  This read does not harm even if the
 		 * stream has already ended.
 		 */
diff --git a/doc/src/sgml/auto-explain.sgml b/doc/src/sgml/auto-explain.sgml
index 192d6574c3..30e35a714a 100644
--- a/doc/src/sgml/auto-explain.sgml
+++ b/doc/src/sgml/auto-explain.sgml
@@ -200,7 +200,7 @@ LOAD 'auto_explain';
     <listitem>
      <para>
       <varname>auto_explain.log_settings</varname> controls whether information
-      about modified configuration options is printed when execution plan is logged.
+      about modified configuration options is printed when an execution plan is logged.
       Only options affecting query planning with value different from the built-in
       default value are included in the output.  This parameter is off by default.
       Only superusers can change this setting.
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index c4897d68c9..872f7a7fac 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -3919,7 +3919,7 @@ CREATE INDEX ON measurement (logdate);
 
     <para>
       Normally the set of partitions established when initially defining the
-      table are not intended to remain static.  It is common to want to
+      table is not intended to remain static.  It is common to want to
       remove old partitions of data and periodically add new partitions for
       new data. One of the most important advantages of partitioning is
       precisely that it allows this otherwise painful task to be executed
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index a29c14bf1c..df13b72974 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -1790,7 +1790,7 @@ ExecuteTruncateGuts(List *explicit_rels, List *relids, List *relids_logged,
 	 *
 	 * We put the ResultRelInfos in the es_opened_result_relations list, even
 	 * though we don't have a range table and don't populate the
-	 * es_result_relations array.  That's a big bogus, but it's enough to make
+	 * es_result_relations array.  That's a bit bogus, but it's enough to make
 	 * ExecGetTriggerResultRel() find them.
 	 */
 	estate = CreateExecutorState();
-- 
2.17.0

v2-0004-More-likely-to-be-less-likely.patchtext/x-diff; charset=us-asciiDownload
From ebc9cae849194a20e6071036a2cb76b40fe85eb2 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Oct 2020 14:27:57 -0500
Subject: [PATCH v2 4/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

v2-0005-comparison-but-see-also-language-changed-at-35cb5.patchtext/x-diff; charset=us-asciiDownload
From e938fca3041b3c8908d5fb1eb733f671a347b11c Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Oct 2020 13:40:59 -0500
Subject: [PATCH v2 5/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

v2-0006-producement-fcec6caafa2346b6c9d3ad5065e417733bd63.patchtext/x-diff; charset=us-asciiDownload
From 670efd948e0da20342f0394dca7a69a04ac051c3 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 25 Oct 2020 13:53:08 -0500
Subject: [PATCH v2 6/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

#10Michael Paquier
michael@paquier.xyz
In reply to: Justin Pryzby (#9)
Re: bulk typos

On Fri, Oct 30, 2020 at 09:08:01PM -0500, Justin Pryzby wrote:

On Sun, Oct 25, 2020 at 02:48:49PM -0500, Justin Pryzby wrote:

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.

What you have sent for xml.c is a clear improvement, but I am not sure
if that's the best we can do. So I have left this part out, and
applied the rest.

PS: I am also quite fond of "unbetimes".
--
Michael