On Mon, Mar 14, 2022 at 11:03:50PM +0000, Kekalainen, Otto wrote:
>  Hello!
> 
> I propose the attached patch to be applied on the 'master' branch of 
> PostgreSQL
> to fix various spelling errors.
> 
> Most fixes are in comments and have no effect on functionality. Some fixes are
> also in variable names but they should be safe to change, as the change is
> consistent in all occurrences of the variable.

LGTM - I found a few of these myself.
Attached now, in case it's useful to handle them together.
>From 7a64f847db6129b347aa5ce2560111639f77a97c Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Mon, 24 Jan 2022 19:40:13 -0600
Subject: [PATCH 01/17] doc: than than

My mistake at 410aa248e5a883fde4832999cc9b23c7ace0f2ff
---
 doc/src/sgml/postgres-fdw.sgml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index 8ebf0dc3a05..88f564d7fd8 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -1003,8 +1003,8 @@ postgres=# SELECT postgres_fdw_disconnect_all();
       it's passed to and used as <varname>application_name</varname>
       in a foreign server, note that it will be truncated to less than
       <symbol>NAMEDATALEN</symbol> characters and anything other than
-      than printable ASCII characters will be replaced with question
-      marks (<literal>?</literal>).
+      printable ASCII characters will be replaced with question marks
+      (<literal>?</literal>).
       See <xref linkend="guc-application-name"/> for details.
      </para>
 
-- 
2.17.1

>From 4f6cb9631f01efda87d139ae74200c216a332842 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Mon, 24 Jan 2022 20:13:38 -0600
Subject: [PATCH 02/17] doc: duplicate words: THE since
 0aa8a01d04c8fe200b7a106878eebc3d0af9105c

Found like:
time find doc -name '*.sgml' |xargs sed -srn ':l; /\n\n/!{N; b l}; /(\<[[:alpha:]]{1,})\>\n[[:space:]]*\<\1\>/!d; s//>>&<</; p' |less

backpatch to v14
---
 doc/src/sgml/logicaldecoding.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index 3d7d52a84d6..cf6d1f2edd3 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -1264,7 +1264,7 @@ OutputPluginWrite(ctx, true);
     streamed in blocks demarcated by <function>stream_start_cb</function>
     and <function>stream_stop_cb</function> callbacks. Once all the decoded
     changes are transmitted, the transaction can be committed using the
-    the <function>stream_commit_cb</function> callback
+    <function>stream_commit_cb</function> callback
     (or possibly aborted using the <function>stream_abort_cb</function> callback).
     If two-phase commits are supported, the transaction can be prepared using the
     <function>stream_prepare_cb</function> callback,
-- 
2.17.1

>From 3c105b2a9c9bcb34e166a9ec36c1a5b5ddcb9b1c Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Fri, 18 Feb 2022 15:09:44 -0600
Subject: [PATCH 03/17] remove duplicate word

---
 src/bin/pg_basebackup/t/010_pg_basebackup.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
index 8cb8cfe045e..44c0a4439ad 100644
--- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl
+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
@@ -22,7 +22,7 @@ my $node = PostgreSQL::Test::Cluster->new('main');
 
 # For nearly all pg_basebackup invocations some options should be specified,
 # to keep test times reasonable. Using @pg_basebackup_defs as the first
-# element of the array passed to to IPC::Run interpolate the array (as it is
+# element of the array passed to IPC::Run interpolate the array (as it is
 # not a reference to an array)...
 my @pg_basebackup_defs = ('pg_basebackup', '--no-sync', '-cfast');
 
-- 
2.17.1

>From ece9a790b956ecefa748dc748f88bfeb97dded7a Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Tue, 25 Jan 2022 10:47:55 -0600
Subject: [PATCH 04/17] doc: database SYSTEM since
 aa01051418f10afbdfa781b8dc109615ca785ff9

---
 doc/src/sgml/ref/create_database.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml
index f70d0c75b4d..3b390027ed3 100644
--- a/doc/src/sgml/ref/create_database.sgml
+++ b/doc/src/sgml/ref/create_database.sgml
@@ -231,7 +231,7 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
        <listitem>
         <para>
          The object identifier to be used for the new database. If this
-         parameter is not specified, the database will choose a suitable
+         parameter is not specified, the database system will choose a suitable
          OID automatically. This parameter is primarily intended for internal
          use by <application>pg_upgrade</application>, and only
          <application>pg_upgrade</application> can specify a value less
-- 
2.17.1

>From f920059b4ea195a6f916147fe4cc0c82c79d875e Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Wed, 16 Feb 2022 21:07:53 -0600
Subject: [PATCH 05/17] doc: Remove 'synchronized' from --no-sync

The corresponding change was made for pgupgrade.sgml in commit 410aa248
---
 doc/src/sgml/ref/pg_rewind.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml
index 33e6bb64ad6..c11f671855f 100644
--- a/doc/src/sgml/ref/pg_rewind.sgml
+++ b/doc/src/sgml/ref/pg_rewind.sgml
@@ -210,7 +210,7 @@ PostgreSQL documentation
         to be written safely to disk.  This option causes
         <command>pg_rewind</command> to return without waiting, which is
         faster, but means that a subsequent operating system crash can leave
-        the synchronized data directory corrupt.  Generally, this option is
+        the data directory corrupt.  Generally, this option is
         useful for testing but should not be used on a production
         installation.
        </para>
-- 
2.17.1

>From 22aa2ed4f9c5dca7077f1382159a378e741c530c Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Wed, 16 Feb 2022 21:26:17 -0600
Subject: [PATCH 06/17] doc: json log dc686681e0799b12c40f44f85fc5bfd7fed4e57f

---
 doc/src/sgml/config.sgml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 5b763bf60f4..7b943fc9795 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -7515,7 +7515,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
       Including <literal>jsonlog</literal> in the
       <varname>log_destination</varname> list provides a convenient way to
       import log files into many different programs. This option emits log
-      lines in (<acronym>JSON</acronym>) format.
+      lines in <acronym>JSON</acronym> format.
      </para>
 
      <para>
@@ -7525,8 +7525,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
      </para>
 
      <para>
-      Each log line is serialized as a JSON object as of the following
-      set of keys with their values.
+      Each log line is serialized as a JSON object with the following
+      set of keys and their associated values.
      </para>
 
      <table>
-- 
2.17.1

>From 3698de7d83cd9edc6578a1490e4c0070e09b587a Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Wed, 16 Feb 2022 22:07:23 -0600
Subject: [PATCH 07/17] doc: Logical decoding of sequences:
 0da92dc530c9251735fc70b20cd004d9630a1266

---
 doc/src/sgml/logicaldecoding.sgml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index cf6d1f2edd3..2dd28497a39 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -832,9 +832,9 @@ typedef void (*LogicalDecodeSequenceCB) (struct LogicalDecodingContext *ctx,
       The <parameter>txn</parameter> parameter contains meta information about
       the transaction the sequence change is part of. Note however that for
       non-transactional increments, the transaction may be either NULL or not
-      NULL, depending on if the transaction already has XID assigned.
-      The <parameter>sequence_lsn</parameter> has WAL location of the sequence
-      update. The <parameter>transactional</parameter> says if the sequence has
+      NULL, depending on if the transaction already has an XID assigned.
+      The <parameter>sequence_lsn</parameter> has the WAL location of the sequence
+      update. <parameter>transactional</parameter> indicates whether the sequence has
       to be replayed as part of the transaction or directly.
 
       The <parameter>last_value</parameter>, <parameter>log_cnt</parameter> and
-- 
2.17.1

>From 7379eb5c492c0b916280a2cc4d2e5081b02ad0d7 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Thu, 17 Feb 2022 21:08:56 -0600
Subject: [PATCH 08/17] doc: s/in local server/on local server/
 94c49d53402240ad7ddbcae9049ff2840a54b9c6

many similar things were fixed in 410aa248e5a883fde4832999cc9b23c7ace0f2ff
---
 doc/src/sgml/postgres-fdw.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index 88f564d7fd8..88a864eb57a 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -1040,7 +1040,7 @@ postgres=# SELECT postgres_fdw_disconnect_all();
         <row>
          <entry><literal>%C</literal></entry>
          <entry>
-          Cluster name in local server
+          Cluster name on local server
           (see <xref linkend="guc-cluster-name"/> for details)
          </entry>
         </row>
-- 
2.17.1

>From c9201d5838e2d37acf387a03606b631ade827cea Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 19 Feb 2022 11:47:35 -0600
Subject: [PATCH 09/17] doc: pg_column_compression(): we say method not
 algorithm everywhere else

could backpatch to v14
---
 doc/src/sgml/func.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 8a802fb2253..1b8e263533e 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -26761,7 +26761,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
         <returnvalue>text</returnvalue>
        </para>
        <para>
-        Shows the compression algorithm that was used to compress
+        Shows the compression method that was used to compress
         an individual variable-length value. Returns <literal>NULL</literal>
         if the value is not compressed.
        </para></entry>
-- 
2.17.1

>From c33a480fa935cf8cfd9815e70e6170e58be59337 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Fri, 4 Feb 2022 20:17:04 -0600
Subject: [PATCH 10/17] comment typo/consistency

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

diff --git a/src/backend/postmaster/bgworker.c b/src/backend/postmaster/bgworker.c
index e441726c83e..30682b63b3f 100644
--- a/src/backend/postmaster/bgworker.c
+++ b/src/backend/postmaster/bgworker.c
@@ -531,7 +531,7 @@ BackgroundWorkerStopNotifications(pid_t pid)
  * This is called during a normal ("smart" or "fast") database shutdown.
  * After this point, no new background workers will be started, so anything
  * that might be waiting for them needs to be kicked off its wait.  We do
- * that by cancelling the bgworker registration entirely, which is perhaps
+ * that by canceling the bgworker registration entirely, which is perhaps
  * overkill, but since we're shutting down it does not matter whether the
  * registration record sticks around.
  *
-- 
2.17.1

>From 3459b4b989b408dd55fa0d25df71986b82f581c8 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Thu, 17 Feb 2022 21:07:29 -0600
Subject: [PATCH 11/17] comment typo since:
 ff9f111bce24fd9bbca7a20315586de877d74923

---
 src/backend/access/transam/xlogrecovery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index f9f212680b0..850a2c376c1 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -2946,7 +2946,7 @@ ReadRecord(XLogReaderState *xlogreader, int emode,
 			/*
 			 * When not in standby mode we find that WAL ends in an incomplete
 			 * record, keep track of that record.  After recovery is done,
-			 * we'll write a record to indicate downstream WAL readers that
+			 * we'll write a record to indicate to downstream WAL readers that
 			 * that portion is to be ignored.
 			 */
 			if (!StandbyMode &&
-- 
2.17.1

>From 0e85921692bcb82f931cb516e3782bd25c782268 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Fri, 18 Feb 2022 18:51:15 -0600
Subject: [PATCH 12/17] Remove extraneous blank lines..

..left behind by d61a361d1aef1231db61162d99b635b89c73169d
---
 contrib/dblink/dblink.c                         | 1 -
 contrib/pg_stat_statements/pg_stat_statements.c | 1 -
 contrib/postgres_fdw/connection.c               | 1 -
 3 files changed, 3 deletions(-)

diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index a06d4bd12db..f528c2c5254 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -1004,7 +1004,6 @@ materializeResult(FunctionCallInfo fcinfo, PGconn *conn, PGresult *res)
 
 			/* clean up GUC settings, if we changed any */
 			restoreLocalGucs(nestlevel);
-
 		}
 	}
 	PG_FINALLY();
diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c
index 9e525a6ad3b..3777b67d20b 100644
--- a/contrib/pg_stat_statements/pg_stat_statements.c
+++ b/contrib/pg_stat_statements/pg_stat_statements.c
@@ -1780,7 +1780,6 @@ pg_stat_statements_internal(FunctionCallInfo fcinfo,
 
 	if (qbuffer)
 		free(qbuffer);
-
 }
 
 /* Number of output arguments (columns) for pg_stat_statements_info */
diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c
index 74d3e732055..946d7402ebc 100644
--- a/contrib/postgres_fdw/connection.c
+++ b/contrib/postgres_fdw/connection.c
@@ -1733,7 +1733,6 @@ postgres_fdw_get_connections(PG_FUNCTION_ARGS)
 		tuplestore_putvalues(rsinfo->setResult, rsinfo->setDesc, values, nulls);
 	}
 
-
 	PG_RETURN_VOID();
 }
 
-- 
2.17.1

>From 9787cc58610ebcecc4fcd51d0ec48635b23dfa5d Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 19 Feb 2022 16:46:45 -0600
Subject: [PATCH 13/17] Cluster.pm since
 b34ca595abd697e716ce369ec1b58624bdd1c431

---
 src/test/perl/PostgreSQL/Test/Cluster.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index 4db52bc9367..e7b91611374 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -1372,9 +1372,9 @@ sub _set_pg_version
 #    local %ENV = $self->_get_env{[%extra_settings]);
 #
 # A copy of the environment is taken and node's host and port settings are
-# added as PGHOST and PGPORT, Then the extra settings (if any) are applied.
-# Any setting in %extra_settings with a value that is undefined is deleted
-# the remainder are# set. Then the PATH and (DY)LD_LIBRARY_PATH are adjusted
+# added as PGHOST and PGPORT, then the extra settings (if any) are applied.
+# Any setting in %extra_settings with a value that is undefined is deleted;
+# the remainder are set. Then the PATH and (DY)LD_LIBRARY_PATH are adjusted
 # if the node's install path is set, and the copy environment is returned.
 #
 # The install path set in new() needs to be a directory containing
-- 
2.17.1

>From 9317702efce8233fb8f491b806a9693dd9c07c95 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Wed, 2 Mar 2022 12:53:40 -0600
Subject: [PATCH 14/17] f!extended stats

See:
a4d75c86bf15220df22de0a92c819ecef9db3849
 7300a699502fe5432b05fbc75baca534b080bebb
 ccaa3569f58796868303629bc2d63ddddb599b38
---
 src/backend/statistics/dependencies.c   | 4 ++--
 src/backend/statistics/extended_stats.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index 34326d55619..92ef5a3549b 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -847,7 +847,7 @@ dependency_is_compatible_clause(Node *clause, Index relid, AttrNumber *attnum)
 			AttrNumber	clause_attnum;
 
 			/*
-			 * Had we found incompatible clause in the arguments, treat the
+			 * If we found an incompatible clause in the arguments, treat the
 			 * whole clause as incompatible.
 			 */
 			if (!dependency_is_compatible_clause((Node *) lfirst(lc),
@@ -1276,7 +1276,7 @@ dependency_is_compatible_expression(Node *clause, Index relid, List *statlist, N
 			Node	   *or_expr = NULL;
 
 			/*
-			 * Had we found incompatible expression in the arguments, treat
+			 * If we found an incompatible expression in the arguments, treat
 			 * the whole expression as incompatible.
 			 */
 			if (!dependency_is_compatible_expression((Node *) lfirst(lc), relid,
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index ca48395d5c5..cb0a22b73e8 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -1501,7 +1501,7 @@ statext_is_compatible_clause_internal(PlannerInfo *root, Node *clause,
 		foreach(lc, expr->args)
 		{
 			/*
-			 * Had we found incompatible clause in the arguments, treat the
+			 * If we found an incompatible clause in the arguments, treat the
 			 * whole clause as incompatible.
 			 */
 			if (!statext_is_compatible_clause_internal(root,
-- 
2.17.1

>From 41a9ea84d73d7a417026d2ec42335bfd71b1924d Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Thu, 3 Mar 2022 23:55:07 -0600
Subject: [PATCH 15/17] typos reported by codespell

---
 src/backend/access/heap/pruneheap.c           | 2 +-
 src/backend/main/main.c                       | 2 +-
 src/bin/pg_basebackup/t/010_pg_basebackup.pl  | 2 +-
 src/bin/pg_verifybackup/t/008_untar.pl        | 2 +-
 src/bin/pg_verifybackup/t/010_client_untar.pl | 2 +-
 src/include/libpq/sasl.h                      | 2 +-
 src/interfaces/libpq/t/001_uri.pl             | 2 +-
 src/test/regress/expected/object_address.out  | 2 +-
 src/test/regress/sql/object_address.sql       | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c
index b6500763a5a..4656f1b3db4 100644
--- a/src/backend/access/heap/pruneheap.c
+++ b/src/backend/access/heap/pruneheap.c
@@ -69,7 +69,7 @@ typedef struct
 	/*
 	 * Tuple visibility is only computed once for each tuple, for correctness
 	 * and efficiency reasons; see comment in heap_page_prune() for
-	 * details. This is of type int8[,] intead of HTSV_Result[], so we can use
+	 * details. This is of type int8[,] instead of HTSV_Result[], so we can use
 	 * -1 to indicate no visibility has been computed, e.g. for LP_DEAD items.
 	 *
 	 * Same indexing as ->marked.
diff --git a/src/backend/main/main.c b/src/backend/main/main.c
index 3d67ce9dcea..c43a527d3f9 100644
--- a/src/backend/main/main.c
+++ b/src/backend/main/main.c
@@ -247,7 +247,7 @@ startup_hacks(const char *progname)
 		 * leaving the default in place would make debugging harder.
 		 *
 		 * MINGW's own C runtime doesn't have _set_abort_behavior(). When
-		 * targetting Microsoft's UCRT with mingw, it never links to the debug
+		 * targeting Microsoft's UCRT with mingw, it never links to the debug
 		 * version of the library and thus doesn't need the call to
 		 * _set_abort_behavior() either.
 		 */
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
index 44c0a4439ad..efefe947d9a 100644
--- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl
+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
@@ -287,7 +287,7 @@ is(scalar(@tblspc_tars), 1, 'one tablespace tar was created');
 SKIP:
 {
 	my $tar = $ENV{TAR};
-	# don't check for a working tar here, to accomodate various odd
+	# don't check for a working tar here, to accommodate various odd
 	# cases such as AIX. If tar doesn't work the init_from_backup below
 	# will fail.
 	skip "no tar program available", 1
diff --git a/src/bin/pg_verifybackup/t/008_untar.pl b/src/bin/pg_verifybackup/t/008_untar.pl
index efbc910dfbb..d52ca17430b 100644
--- a/src/bin/pg_verifybackup/t/008_untar.pl
+++ b/src/bin/pg_verifybackup/t/008_untar.pl
@@ -95,7 +95,7 @@ for my $tc (@test_configuration)
 
 		SKIP: {
 			my $tar = $ENV{TAR};
-			# don't check for a working tar here, to accomodate various odd
+			# don't check for a working tar here, to accommodate various odd
 			# cases such as AIX. If tar doesn't work the init_from_backup below
 			# will fail.
 			skip "no tar program available", 1
diff --git a/src/bin/pg_verifybackup/t/010_client_untar.pl b/src/bin/pg_verifybackup/t/010_client_untar.pl
index c2a6161be68..0b96b6cc43c 100644
--- a/src/bin/pg_verifybackup/t/010_client_untar.pl
+++ b/src/bin/pg_verifybackup/t/010_client_untar.pl
@@ -96,7 +96,7 @@ for my $tc (@test_configuration)
 
 		SKIP: {
 			my $tar = $ENV{TAR};
-			# don't check for a working tar here, to accomodate various odd
+			# don't check for a working tar here, to accommodate various odd
 			# cases such as AIX. If tar doesn't work the init_from_backup below
 			# will fail.
 			skip "no tar program available", 1
diff --git a/src/include/libpq/sasl.h b/src/include/libpq/sasl.h
index 71cc0dc2514..39ccf8f0e31 100644
--- a/src/include/libpq/sasl.h
+++ b/src/include/libpq/sasl.h
@@ -62,7 +62,7 @@ typedef struct pg_be_sasl_mech
 	 * must return a pointer to its allocated state, which will be passed
 	 * as-is as the first argument to the other callbacks.
 	 *
-	 * Input paramters:
+	 * Input parameters:
 	 *
 	 *	port:        The client Port.
 	 *
diff --git a/src/interfaces/libpq/t/001_uri.pl b/src/interfaces/libpq/t/001_uri.pl
index 90f370f8fd6..1d595c05292 100644
--- a/src/interfaces/libpq/t/001_uri.pl
+++ b/src/interfaces/libpq/t/001_uri.pl
@@ -232,7 +232,7 @@ sub test_uri
 	chomp($result{stderr});
 
 	# use is_deeply so there's one test result for each test above, without
-	# loosing the information whether stdout/stderr mismatched.
+	# losing the information whether stdout/stderr mismatched.
 	is_deeply(\%result, \%expect, $uri);
 }
 
diff --git a/src/test/regress/expected/object_address.out b/src/test/regress/expected/object_address.out
index a9e7f2eed56..4117fc27c9a 100644
--- a/src/test/regress/expected/object_address.out
+++ b/src/test/regress/expected/object_address.out
@@ -558,7 +558,7 @@ WITH objects (classid, objid, objsubid) AS (VALUES
     ('pg_namespace'::regclass, 0, 0), -- no schema
     ('pg_statistic_ext'::regclass, 0, 0), -- no statistics
     ('pg_ts_parser'::regclass, 0, 0), -- no TS parser
-    ('pg_ts_dict'::regclass, 0, 0), -- no TS dictionnary
+    ('pg_ts_dict'::regclass, 0, 0), -- no TS dictionary
     ('pg_ts_template'::regclass, 0, 0), -- no TS template
     ('pg_ts_config'::regclass, 0, 0), -- no TS configuration
     ('pg_authid'::regclass, 0, 0), -- no role
diff --git a/src/test/regress/sql/object_address.sql b/src/test/regress/sql/object_address.sql
index 2f40156eb48..acd0468a9d9 100644
--- a/src/test/regress/sql/object_address.sql
+++ b/src/test/regress/sql/object_address.sql
@@ -259,7 +259,7 @@ WITH objects (classid, objid, objsubid) AS (VALUES
     ('pg_namespace'::regclass, 0, 0), -- no schema
     ('pg_statistic_ext'::regclass, 0, 0), -- no statistics
     ('pg_ts_parser'::regclass, 0, 0), -- no TS parser
-    ('pg_ts_dict'::regclass, 0, 0), -- no TS dictionnary
+    ('pg_ts_dict'::regclass, 0, 0), -- no TS dictionary
     ('pg_ts_template'::regclass, 0, 0), -- no TS template
     ('pg_ts_config'::regclass, 0, 0), -- no TS configuration
     ('pg_authid'::regclass, 0, 0), -- no role
-- 
2.17.1

>From d6ac4be3972a60d1482405d2237628e366183e65 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Tue, 8 Mar 2022 09:19:01 -0600
Subject: [PATCH 16/17] Double spaces

I noticed one which was introduced at 9e9858389, and then grepped for the
others like:

git grep '^   * \* *[^        ].*[[:alnum:]]  '
---
 src/backend/optimizer/path/costsize.c           | 2 +-
 src/backend/replication/logical/reorderbuffer.c | 2 +-
 src/backend/replication/slot.c                  | 2 +-
 src/backend/tsearch/ts_parse.c                  | 2 +-
 src/backend/utils/adt/geo_ops.c                 | 2 +-
 src/backend/utils/adt/pg_locale.c               | 2 +-
 src/backend/utils/adt/tsquery.c                 | 2 +-
 src/backend/utils/fmgr/funcapi.c                | 2 +-
 src/include/utils/sortsupport.h                 | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 8dc7dd4ca26..27adc13eaaa 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -6150,7 +6150,7 @@ compute_bitmap_pages(PlannerInfo *root, RelOptInfo *baserel, Path *bitmapqual,
 		exact_pages = heap_pages - lossy_pages;
 
 		/*
-		 * If there are lossy pages then recompute the  number of tuples
+		 * If there are lossy pages then recompute the number of tuples
 		 * processed by the bitmap heap node.  We assume here that the chance
 		 * of a given tuple coming from an exact page is the same as the
 		 * chance that a given page is exact.  This might not be true, but
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index c2d9be81fae..5e9b715614b 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -2153,7 +2153,7 @@ ReorderBufferStreamCommit(ReorderBuffer *rb, ReorderBufferTXN *txn)
  * xid 502 which is not visible to our snapshot.  And when we will try to
  * decode with that catalog tuple, it can lead to a wrong result or a crash.
  * So, it is necessary to detect concurrent aborts to allow streaming of
- * in-progress transactions or decoding of prepared  transactions.
+ * in-progress transactions or decoding of prepared transactions.
  *
  * For detecting the concurrent abort we set CheckXidAlive to the current
  * (sub)transaction's xid for which this change belongs to.  And, during
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index caa6b297560..994138d7888 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -247,7 +247,7 @@ ReplicationSlotValidateName(const char *name, int elevel)
  *     to be enabled only at the slot creation time. If we allow this option
  *     to be changed during decoding then it is quite possible that we skip
  *     prepare first time because this option was not enabled. Now next time
- *     during getting changes, if the two_phase  option is enabled it can skip
+ *     during getting changes, if the two_phase option is enabled it can skip
  *     prepare because by that time start decoding point has been moved. So the
  *     user will only get commit prepared.
  */
diff --git a/src/backend/tsearch/ts_parse.c b/src/backend/tsearch/ts_parse.c
index bf4247048dd..fe469881612 100644
--- a/src/backend/tsearch/ts_parse.c
+++ b/src/backend/tsearch/ts_parse.c
@@ -248,7 +248,7 @@ LexizeExec(LexizeData *ld, ParsedLex **correspondLexem)
 		dict = lookup_ts_dictionary_cache(ld->curDictId);
 
 		/*
-		 * Dictionary ld->curDictId asks  us about following words
+		 * Dictionary ld->curDictId asks us about following words
 		 */
 
 		while (ld->curSub)
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index 609aab2e651..b79705f8b3f 100644
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -3878,7 +3878,7 @@ lseg_inside_poly(Point *a, Point *b, POLYGON *poly, int start)
 		Point		p;
 
 		/*
-		 * if X-intersection wasn't found  then check central point of tested
+		 * if X-intersection wasn't found, then check central point of tested
 		 * segment. In opposite case we already check all subsegments
 		 */
 		p.x = float8_div(float8_pl(t.p[0].x, t.p[1].x), 2.0);
diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c
index 871a710967c..c6103d928fa 100644
--- a/src/backend/utils/adt/pg_locale.c
+++ b/src/backend/utils/adt/pg_locale.c
@@ -991,7 +991,7 @@ search_locale_enum(LPWSTR pStr, DWORD dwFlags, LPARAM lparam)
 						test_locale, LOCALE_NAME_MAX_LENGTH))
 	{
 		/*
-		 * If the enumerated locale does not have a hyphen ("en") OR  the
+		 * If the enumerated locale does not have a hyphen ("en") OR the
 		 * lc_message input does not have an underscore ("English"), we only
 		 * need to compare the <Language> tags.
 		 */
diff --git a/src/backend/utils/adt/tsquery.c b/src/backend/utils/adt/tsquery.c
index f0a95297b3e..f54f2988149 100644
--- a/src/backend/utils/adt/tsquery.c
+++ b/src/backend/utils/adt/tsquery.c
@@ -261,7 +261,7 @@ parse_or_operator(TSQueryParserState pstate)
 		/*
 		 * Suppose, we found an operand, but could be a not correct operand.
 		 * So we still treat OR literal as operation with possibly incorrect
-		 * operand and  will not search it as lexeme
+		 * operand and will not search it as lexeme
 		 */
 		if (!t_isspace(ptr))
 			break;
diff --git a/src/backend/utils/fmgr/funcapi.c b/src/backend/utils/fmgr/funcapi.c
index d269662ad8e..9197b0f1e26 100644
--- a/src/backend/utils/fmgr/funcapi.c
+++ b/src/backend/utils/fmgr/funcapi.c
@@ -69,7 +69,7 @@ static TypeFuncClass get_type_func_class(Oid typid, Oid *base_typeid);
  * descriptor coming from expectedDesc, which is the tuple descriptor
  * expected by the caller.  SRF_SINGLE_BLESS can be set to complete the
  * information associated to the tuple descriptor, which is necessary
- * in some cases  where the tuple descriptor comes from a transient
+ * in some cases where the tuple descriptor comes from a transient
  * RECORD datatype.
  */
 void
diff --git a/src/include/utils/sortsupport.h b/src/include/utils/sortsupport.h
index 6e3cab82d25..59274f37ec5 100644
--- a/src/include/utils/sortsupport.h
+++ b/src/include/utils/sortsupport.h
@@ -24,7 +24,7 @@
  * function will have a shim set up by sort support automatically.  However,
  * opclasses that support the optional additional abbreviated key capability
  * must always provide an authoritative comparator used to tie-break
- * inconclusive abbreviated comparisons and also used  when aborting
+ * inconclusive abbreviated comparisons and also used when aborting
  * abbreviation.  Furthermore, a converter and abort/costing function must be
  * provided.
  *
-- 
2.17.1

>From 5df8bba86ec2486838c99cfe88e9a69880878b22 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryz...@telsasoft.com>
Date: Sat, 12 Mar 2022 14:55:18 -0600
Subject: [PATCH 17/17] comment spaces

---
 src/backend/storage/file/fd.c     | 2 +-
 src/include/replication/message.h | 2 +-
 src/include/tsearch/ts_type.h     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 14b77f28617..24704b6a023 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -912,7 +912,7 @@ InitFileAccess(void)
 void
 InitTemporaryFileAccess(void)
 {
-	Assert(SizeVfdCache != 0);	/* InitFileAccess() needs to have run*/
+	Assert(SizeVfdCache != 0);	/* InitFileAccess() needs to have run */
 	Assert(!temporary_files_allowed);	/* call me only once */
 
 	/*
diff --git a/src/include/replication/message.h b/src/include/replication/message.h
index 7d7785292f1..b9686c28550 100644
--- a/src/include/replication/message.h
+++ b/src/include/replication/message.h
@@ -32,7 +32,7 @@ typedef struct xl_logical_message
 extern XLogRecPtr LogLogicalMessage(const char *prefix, const char *message,
 									size_t size, bool transactional);
 
-/* RMGR API*/
+/* RMGR API */
 #define XLOG_LOGICAL_MESSAGE	0x00
 void		logicalmsg_redo(XLogReaderState *record);
 void		logicalmsg_desc(StringInfo buf, XLogReaderState *record);
diff --git a/src/include/tsearch/ts_type.h b/src/include/tsearch/ts_type.h
index 1a8bad84914..93ae0483fc5 100644
--- a/src/include/tsearch/ts_type.h
+++ b/src/include/tsearch/ts_type.h
@@ -171,7 +171,7 @@ typedef struct
 
 extern const int tsearch_op_priority[OP_COUNT];
 
-/* get operation priority  by its code*/
+/* get operation priority by its code */
 #define OP_PRIORITY(x)	( tsearch_op_priority[(x) - 1] )
 /* get QueryOperator priority */
 #define QO_PRIORITY(x)	OP_PRIORITY(((QueryOperator *) (x))->oper)
-- 
2.17.1

Reply via email to