From 0f0a22ec36a15bfc689605c1c6c44d019a05175a Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <daniel@yesql.se>
Date: Fri, 2 Nov 2018 13:24:24 +0100
Subject: [PATCH] Fix various typos around the tree

---
 doc/src/sgml/libpq.sgml                    | 6 +++---
 doc/src/sgml/lobj.sgml                     | 2 +-
 doc/src/sgml/logical-replication.sgml      | 2 +-
 src/backend/access/nbtree/nbtsearch.c      | 2 +-
 src/backend/access/transam/xact.c          | 2 +-
 src/backend/commands/tablecmds.c           | 2 +-
 src/backend/executor/execExprInterp.c      | 2 +-
 src/backend/executor/execPartition.c       | 2 +-
 src/backend/jit/llvm/llvmjit.c             | 4 ++--
 src/backend/optimizer/plan/createplan.c    | 2 +-
 src/backend/port/tas/sunstudio_sparc.s     | 2 +-
 src/backend/storage/ipc/dsm.c              | 4 ++--
 src/backend/storage/ipc/latch.c            | 2 +-
 src/backend/utils/adt/formatting.c         | 2 +-
 src/backend/utils/adt/jsonb_util.c         | 2 +-
 src/backend/utils/adt/jsonfuncs.c          | 2 +-
 src/backend/utils/cache/attoptcache.c      | 2 +-
 src/backend/utils/cache/relfilenodemap.c   | 2 +-
 src/backend/utils/cache/typcache.c         | 2 +-
 src/bin/pgbench/t/002_pgbench_no_server.pl | 2 +-
 src/include/replication/worker_internal.h  | 2 +-
 src/interfaces/ecpg/preproc/check_rules.pl | 2 +-
 src/interfaces/ecpg/preproc/parse.pl       | 2 +-
 src/test/examples/testlibpq.c              | 2 +-
 src/test/examples/testlibpq2.c             | 2 +-
 src/test/examples/testlibpq3.c             | 2 +-
 src/test/examples/testlibpq4.c             | 2 +-
 src/test/examples/testlo.c                 | 2 +-
 src/test/examples/testlo64.c               | 2 +-
 src/test/regress/expected/foreign_key.out  | 2 +-
 src/test/regress/expected/privileges.out   | 2 +-
 src/test/regress/sql/foreign_key.sql       | 2 +-
 src/test/regress/sql/privileges.sql        | 2 +-
 src/test/subscription/t/004_sync.pl        | 2 +-
 src/tools/msvc/Mkvcbuild.pm                | 2 +-
 35 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 82a440531b..601091c570 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -8478,7 +8478,7 @@ main(int argc, char **argv)
         exit_nicely(conn);
     }
 
-    /* Set always-secure search path, so malicous users can't take control. */
+    /* Set always-secure search path, so malicious users can't take control. */
     res = PQexec(conn,
                  "SELECT pg_catalog.set_config('search_path', '', false)");
     if (PQresultStatus(res) != PGRES_TUPLES_OK)
@@ -8648,7 +8648,7 @@ main(int argc, char **argv)
         exit_nicely(conn);
     }
 
-    /* Set always-secure search path, so malicous users can't take control. */
+    /* Set always-secure search path, so malicious users can't take control. */
     res = PQexec(conn,
                  "SELECT pg_catalog.set_config('search_path', '', false)");
     if (PQresultStatus(res) != PGRES_TUPLES_OK)
@@ -8875,7 +8875,7 @@ main(int argc, char **argv)
         exit_nicely(conn);
     }
 
-    /* Set always-secure search path, so malicous users can't take control. */
+    /* Set always-secure search path, so malicious users can't take control. */
     res = PQexec(conn, "SET search_path = testlibpq3");
     if (PQresultStatus(res) != PGRES_COMMAND_OK)
     {
diff --git a/doc/src/sgml/lobj.sgml b/doc/src/sgml/lobj.sgml
index 7a9af9c31e..4bcce4f5ed 100644
--- a/doc/src/sgml/lobj.sgml
+++ b/doc/src/sgml/lobj.sgml
@@ -933,7 +933,7 @@ main(int argc, char **argv)
         exit_nicely(conn);
     }
 
-    /* Set always-secure search path, so malicous users can't take control. */
+    /* Set always-secure search path, so malicious users can't take control. */
     res = PQexec(conn,
                  "SELECT pg_catalog.set_config('search_path', '', false)");
     if (PQresultStatus(res) != PGRES_TUPLES_OK)
diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml
index 21c6c7817d..3f2f674a1a 100644
--- a/doc/src/sgml/logical-replication.sgml
+++ b/doc/src/sgml/logical-replication.sgml
@@ -377,7 +377,7 @@
      some care must be taken when truncating groups of tables connected by
      foreign keys.  When replicating a truncate action, the subscriber will
      truncate the same group of tables that was truncated on the publisher,
-     either explictly specified or implicitly collected via
+     either explicitly specified or implicitly collected via
      <literal>CASCADE</literal>, minus tables that are not part of the
      subscription.  This will work correctly if all affected tables are part
      of the same subscription.  But if some tables to be truncated on the
diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c
index 8b2772c154..16223d01ec 100644
--- a/src/backend/access/nbtree/nbtsearch.c
+++ b/src/backend/access/nbtree/nbtsearch.c
@@ -184,7 +184,7 @@ _bt_search(Relation rel, int keysz, ScanKey scankey, bool nextkey,
 
 	/*
 	 * If we're asked to lock leaf in write mode, but didn't manage to, then
-	 * relock.  That may happend when root page appears to be leaf.
+	 * relock.  That may happen when the root page appears to be leaf.
 	 */
 	if (access == BT_WRITE && page_access == BT_READ)
 	{
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 8c1621d949..a979d7e07b 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -487,7 +487,7 @@ AssignTransactionId(TransactionState s)
 
 	/*
 	 * Ensure parent(s) have XIDs, so that a child always has an XID later
-	 * than its parent.  Musn't recurse here, or we might get a stack overflow
+	 * than its parent.  Mustn't recurse here, or we might get a stack overflow
 	 * if we're at the bottom of a huge stack of subtransactions none of which
 	 * have XIDs yet.
 	 */
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index ba76c3f9b9..a3de886c47 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -834,7 +834,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
 		if (OidIsValid(defaultPartOid))
 			defaultRel = heap_open(defaultPartOid, AccessExclusiveLock);
 
-		/* Tranform the bound values */
+		/* Transform the bound values */
 		pstate = make_parsestate(NULL);
 		pstate->p_sourcetext = queryString;
 
diff --git a/src/backend/executor/execExprInterp.c b/src/backend/executor/execExprInterp.c
index 1b0946b02f..c08df6f162 100644
--- a/src/backend/executor/execExprInterp.c
+++ b/src/backend/executor/execExprInterp.c
@@ -1622,7 +1622,7 @@ ExecInterpExpr(ExprState *state, ExprContext *econtext, bool *isnull)
 
 		/*
 		 * Evaluate aggregate transition / combine function that has a
-		 * by-value transition type. That's a seperate case from the
+		 * by-value transition type. That's a separate case from the
 		 * by-reference implementation because it's a bit simpler.
 		 */
 		EEO_CASE(EEOP_AGG_PLAIN_TRANS_BYVAL)
diff --git a/src/backend/executor/execPartition.c b/src/backend/executor/execPartition.c
index 0bcb2377c3..1e72e9fb3f 100644
--- a/src/backend/executor/execPartition.c
+++ b/src/backend/executor/execPartition.c
@@ -852,7 +852,7 @@ ExecCleanupTupleRouting(ModifyTableState *mtstate,
 	{
 		ResultRelInfo *resultRelInfo = proute->partitions[i];
 
-		/* skip further processsing for uninitialized partitions */
+		/* skip further processing for uninitialized partitions */
 		if (resultRelInfo == NULL)
 			continue;
 
diff --git a/src/backend/jit/llvm/llvmjit.c b/src/backend/jit/llvm/llvmjit.c
index 7510698f86..a543dd3711 100644
--- a/src/backend/jit/llvm/llvmjit.c
+++ b/src/backend/jit/llvm/llvmjit.c
@@ -438,7 +438,7 @@ llvm_optimize_module(LLVMJitContext *context, LLVMModuleRef module)
 
 	if (context->base.flags & PGJIT_OPT3)
 	{
-		/* TODO: Unscientifically determined threshhold */
+		/* TODO: Unscientifically determined threshold */
 		LLVMPassManagerBuilderUseInlinerWithThreshold(llvm_pmb, 512);
 	}
 	else
@@ -853,7 +853,7 @@ llvm_split_symbol_name(const char *name, char **modname, char **funcname)
 	{
 		/*
 		 * Symbol names cannot contain a ., therefore we can split based on
-		 * first and last occurance of one.
+		 * first and last occurrence of one.
 		 */
 		*funcname = rindex(name, '.');
 		(*funcname)++;			/* jump over . */
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c
index ae46b0140e..da7a92081a 100644
--- a/src/backend/optimizer/plan/createplan.c
+++ b/src/backend/optimizer/plan/createplan.c
@@ -65,7 +65,7 @@
  * and Group, which need these values to be available in their inputs.
  *
  * CP_IGNORE_TLIST specifies that the caller plans to replace the targetlist,
- * and therefore it doens't matter a bit what target list gets generated.
+ * and therefore it doesn't matter a bit what target list gets generated.
  */
 #define CP_EXACT_TLIST		0x0001	/* Plan must return specified tlist */
 #define CP_SMALL_TLIST		0x0002	/* Prefer narrower tlists */
diff --git a/src/backend/port/tas/sunstudio_sparc.s b/src/backend/port/tas/sunstudio_sparc.s
index b041a296ca..0db590ee46 100644
--- a/src/backend/port/tas/sunstudio_sparc.s
+++ b/src/backend/port/tas/sunstudio_sparc.s
@@ -26,7 +26,7 @@
 pg_atomic_cas:
 
 	! "cas" only works on sparcv9 and sparcv8plus chips, and
-	! requies a compiler targeting these CPUs.  It will fail
+	! requires a compiler targeting these CPUs.  It will fail
 	! on a compiler targeting sparcv8, and of course will not
 	! be understood by a sparcv8 CPU.  gcc continues to use
 	! "ldstub" because it targets sparcv7.
diff --git a/src/backend/storage/ipc/dsm.c b/src/backend/storage/ipc/dsm.c
index 9629f22f7a..d4bd6ef449 100644
--- a/src/backend/storage/ipc/dsm.c
+++ b/src/backend/storage/ipc/dsm.c
@@ -429,7 +429,7 @@ dsm_set_control_handle(dsm_handle h)
  * If there is a non-NULL CurrentResourceOwner, the new segment is associated
  * with it and must be detached before the resource owner releases, or a
  * warning will be logged.  If CurrentResourceOwner is NULL, the segment
- * remains attached until explicitely detached or the session ends.
+ * remains attached until explicitly detached or the session ends.
  * Creating with a NULL CurrentResourceOwner is equivalent to creating
  * with a non-NULL CurrentResourceOwner and then calling dsm_pin_mapping.
  */
@@ -527,7 +527,7 @@ dsm_create(Size size, int flags)
  * If there is a non-NULL CurrentResourceOwner, the attached segment is
  * associated with it and must be detached before the resource owner releases,
  * or a warning will be logged.  Otherwise the segment remains attached until
- * explicitely detached or the session ends.  See the note atop dsm_create().
+ * explicitly detached or the session ends.  See the note atop dsm_create().
  */
 dsm_segment *
 dsm_attach(dsm_handle h)
diff --git a/src/backend/storage/ipc/latch.c b/src/backend/storage/ipc/latch.c
index f6dda9cc9a..c129446f9c 100644
--- a/src/backend/storage/ipc/latch.c
+++ b/src/backend/storage/ipc/latch.c
@@ -1030,7 +1030,7 @@ WaitEventSetWait(WaitEventSet *set, long timeout,
 /*
  * Wait using linux's epoll_wait(2).
  *
- * This is the preferrable wait method, as several readiness notifications are
+ * This is the preferable wait method, as several readiness notifications are
  * delivered, without having to iterate through all of set->events. The return
  * epoll_event struct contain a pointer to our events, making association
  * easy.
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c
index 4118b78ae4..2923afe7b6 100644
--- a/src/backend/utils/adt/formatting.c
+++ b/src/backend/utils/adt/formatting.c
@@ -3706,7 +3706,7 @@ to_timestamp(PG_FUNCTION_ARGS)
 
 /* ----------
  * TO_DATE
- *	Make Date from date_str which is formated at argument 'fmt'
+ *	Make Date from date_str which is formatted at argument 'fmt'
  * ----------
  */
 Datum
diff --git a/src/backend/utils/adt/jsonb_util.c b/src/backend/utils/adt/jsonb_util.c
index 3be900f8ee..713631b04f 100644
--- a/src/backend/utils/adt/jsonb_util.c
+++ b/src/backend/utils/adt/jsonb_util.c
@@ -1363,7 +1363,7 @@ compareJsonbScalarValue(JsonbValue *aScalar, JsonbValue *bScalar)
 
 
 /*
- * Functions for manipulating the resizeable buffer used by convertJsonb and
+ * Functions for manipulating the resizable buffer used by convertJsonb and
  * its subroutines.
  */
 
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c
index 06f8d28168..0d3e1121cd 100644
--- a/src/backend/utils/adt/jsonfuncs.c
+++ b/src/backend/utils/adt/jsonfuncs.c
@@ -5040,7 +5040,7 @@ iterate_jsonb_values(Jsonb *jb, uint32 flags, void *state,
 
 	/*
 	 * Just recursively iterating over jsonb and call callback on all
-	 * correspoding elements
+	 * corresponding elements
 	 */
 	while ((type = JsonbIteratorNext(&it, &v, false)) != WJB_DONE)
 	{
diff --git a/src/backend/utils/cache/attoptcache.c b/src/backend/utils/cache/attoptcache.c
index 92468472a4..f5c02affcd 100644
--- a/src/backend/utils/cache/attoptcache.c
+++ b/src/backend/utils/cache/attoptcache.c
@@ -24,7 +24,7 @@
 #include "utils/syscache.h"
 
 
-/* Hash table for informations about each attribute's options */
+/* Hash table for information about each attribute's options */
 static HTAB *AttoptCacheHash = NULL;
 
 /* attrelid and attnum form the lookup key, and must appear first */
diff --git a/src/backend/utils/cache/relfilenodemap.c b/src/backend/utils/cache/relfilenodemap.c
index 6f6bba79c3..34679725b3 100644
--- a/src/backend/utils/cache/relfilenodemap.c
+++ b/src/backend/utils/cache/relfilenodemap.c
@@ -29,7 +29,7 @@
 #include "utils/relfilenodemap.h"
 #include "utils/relmapper.h"
 
-/* Hash table for informations about each relfilenode <-> oid pair */
+/* Hash table for information about each relfilenode <-> oid pair */
 static HTAB *RelfilenodeMapHash = NULL;
 
 /* built first time through in InitializeRelfilenodeMap */
diff --git a/src/backend/utils/cache/typcache.c b/src/backend/utils/cache/typcache.c
index e38fd16eb0..663d4ed8bb 100644
--- a/src/backend/utils/cache/typcache.c
+++ b/src/backend/utils/cache/typcache.c
@@ -1869,7 +1869,7 @@ assign_record_type_identifier(Oid type_id, int32 typmod)
 }
 
 /*
- * Return the amout of shmem required to hold a SharedRecordTypmodRegistry.
+ * Return the amount of shmem required to hold a SharedRecordTypmodRegistry.
  * This exists only to avoid exposing private innards of
  * SharedRecordTypmodRegistry in a header.
  */
diff --git a/src/bin/pgbench/t/002_pgbench_no_server.pl b/src/bin/pgbench/t/002_pgbench_no_server.pl
index 696c378edc..b78057d050 100644
--- a/src/bin/pgbench/t/002_pgbench_no_server.pl
+++ b/src/bin/pgbench/t/002_pgbench_no_server.pl
@@ -158,7 +158,7 @@ my @options = (
 		]
 	],
 
-	# loging sub-options
+	# logging sub-options
 	[
 		'sampling => log', '--sampling-rate=0.01',
 		[qr{log sampling .* only when}]
diff --git a/src/include/replication/worker_internal.h b/src/include/replication/worker_internal.h
index 1ce3b6b058..ef079111cd 100644
--- a/src/include/replication/worker_internal.h
+++ b/src/include/replication/worker_internal.h
@@ -27,7 +27,7 @@ typedef struct LogicalRepWorker
 	/* Indicates if this slot is used or free. */
 	bool		in_use;
 
-	/* Increased everytime the slot is taken by new worker. */
+	/* Increased every time the slot is taken by new worker. */
 	uint16		generation;
 
 	/* Pointer to proc array. NULL if not running. */
diff --git a/src/interfaces/ecpg/preproc/check_rules.pl b/src/interfaces/ecpg/preproc/check_rules.pl
index 6c8b004854..8b06bd8368 100644
--- a/src/interfaces/ecpg/preproc/check_rules.pl
+++ b/src/interfaces/ecpg/preproc/check_rules.pl
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # src/interfaces/ecpg/preproc/check_rules.pl
-# test parser generater for ecpg
+# test parser generator for ecpg
 # call with backend parser as stdin
 #
 # Copyright (c) 2009-2018, PostgreSQL Global Development Group
diff --git a/src/interfaces/ecpg/preproc/parse.pl b/src/interfaces/ecpg/preproc/parse.pl
index ad87aad283..e1c0a2ccb7 100644
--- a/src/interfaces/ecpg/preproc/parse.pl
+++ b/src/interfaces/ecpg/preproc/parse.pl
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # src/interfaces/ecpg/preproc/parse.pl
-# parser generater for ecpg version 2
+# parser generator for ecpg version 2
 # call with backend parser as stdin
 #
 # Copyright (c) 2007-2018, PostgreSQL Global Development Group
diff --git a/src/test/examples/testlibpq.c b/src/test/examples/testlibpq.c
index d9c6c4587d..18c98083de 100644
--- a/src/test/examples/testlibpq.c
+++ b/src/test/examples/testlibpq.c
@@ -48,7 +48,7 @@ main(int argc, char **argv)
 		exit_nicely(conn);
 	}
 
-	/* Set always-secure search path, so malicous users can't take control. */
+	/* Set always-secure search path, so malicious users can't take control. */
 	res = PQexec(conn,
 				 "SELECT pg_catalog.set_config('search_path', '', false)");
 	if (PQresultStatus(res) != PGRES_TUPLES_OK)
diff --git a/src/test/examples/testlibpq2.c b/src/test/examples/testlibpq2.c
index 6cdf8c8631..511246763a 100644
--- a/src/test/examples/testlibpq2.c
+++ b/src/test/examples/testlibpq2.c
@@ -77,7 +77,7 @@ main(int argc, char **argv)
 		exit_nicely(conn);
 	}
 
-	/* Set always-secure search path, so malicous users can't take control. */
+	/* Set always-secure search path, so malicious users can't take control. */
 	res = PQexec(conn,
 				 "SELECT pg_catalog.set_config('search_path', '', false)");
 	if (PQresultStatus(res) != PGRES_TUPLES_OK)
diff --git a/src/test/examples/testlibpq3.c b/src/test/examples/testlibpq3.c
index 00e62b43d2..c3b524cfdf 100644
--- a/src/test/examples/testlibpq3.c
+++ b/src/test/examples/testlibpq3.c
@@ -142,7 +142,7 @@ main(int argc, char **argv)
 		exit_nicely(conn);
 	}
 
-	/* Set always-secure search path, so malicous users can't take control. */
+	/* Set always-secure search path, so malicious users can't take control. */
 	res = PQexec(conn, "SET search_path = testlibpq3");
 	if (PQresultStatus(res) != PGRES_COMMAND_OK)
 	{
diff --git a/src/test/examples/testlibpq4.c b/src/test/examples/testlibpq4.c
index 6fcbdda2fa..df8e454b5d 100644
--- a/src/test/examples/testlibpq4.c
+++ b/src/test/examples/testlibpq4.c
@@ -34,7 +34,7 @@ check_prepare_conn(PGconn *conn, const char *dbName)
 		exit(1);
 	}
 
-	/* Set always-secure search path, so malicous users can't take control. */
+	/* Set always-secure search path, so malicious users can't take control. */
 	res = PQexec(conn,
 				 "SELECT pg_catalog.set_config('search_path', '', false)");
 	if (PQresultStatus(res) != PGRES_TUPLES_OK)
diff --git a/src/test/examples/testlo.c b/src/test/examples/testlo.c
index 8d8fb494f9..79170e97b8 100644
--- a/src/test/examples/testlo.c
+++ b/src/test/examples/testlo.c
@@ -232,7 +232,7 @@ main(int argc, char **argv)
 		exit_nicely(conn);
 	}
 
-	/* Set always-secure search path, so malicous users can't take control. */
+	/* Set always-secure search path, so malicious users can't take control. */
 	res = PQexec(conn,
 				 "SELECT pg_catalog.set_config('search_path', '', false)");
 	if (PQresultStatus(res) != PGRES_TUPLES_OK)
diff --git a/src/test/examples/testlo64.c b/src/test/examples/testlo64.c
index 85da06a640..2b1677aefa 100644
--- a/src/test/examples/testlo64.c
+++ b/src/test/examples/testlo64.c
@@ -256,7 +256,7 @@ main(int argc, char **argv)
 		exit_nicely(conn);
 	}
 
-	/* Set always-secure search path, so malicous users can't take control. */
+	/* Set always-secure search path, so malicious users can't take control. */
 	res = PQexec(conn,
 				 "SELECT pg_catalog.set_config('search_path', '', false)");
 	if (PQresultStatus(res) != PGRES_TUPLES_OK)
diff --git a/src/test/regress/expected/foreign_key.out b/src/test/regress/expected/foreign_key.out
index 52164e89d2..fee594531d 100644
--- a/src/test/regress/expected/foreign_key.out
+++ b/src/test/regress/expected/foreign_key.out
@@ -1476,7 +1476,7 @@ ALTER TABLE fk_partitioned_fk ADD FOREIGN KEY (a, b)
   REFERENCES fk_notpartitioned_pk NOT VALID;
 ERROR:  cannot add NOT VALID foreign key on partitioned table "fk_partitioned_fk" referencing relation "fk_notpartitioned_pk"
 DETAIL:  This feature is not yet supported on partitioned tables.
--- these inserts, targetting both the partition directly as well as the
+-- these inserts, targeting both the partition directly as well as the
 -- partitioned table, should all fail
 INSERT INTO fk_partitioned_fk (a,b) VALUES (500, 501);
 ERROR:  insert or update on table "fk_partitioned_fk_1" violates foreign key constraint "fk_partitioned_fk_a_fkey"
diff --git a/src/test/regress/expected/privileges.out b/src/test/regress/expected/privileges.out
index 7d5d1f0bc1..d3925e75f5 100644
--- a/src/test/regress/expected/privileges.out
+++ b/src/test/regress/expected/privileges.out
@@ -738,7 +738,7 @@ SELECT '{1}'::int4[]::int8[];
 (1 row)
 
 REVOKE ALL ON FUNCTION int8(integer) FROM PUBLIC;
-SELECT '{1}'::int4[]::int8[]; --superuser, suceed
+SELECT '{1}'::int4[]::int8[]; --superuser, succeed
  int8 
 ------
  {1}
diff --git a/src/test/regress/sql/foreign_key.sql b/src/test/regress/sql/foreign_key.sql
index f387004855..068ab2aab7 100644
--- a/src/test/regress/sql/foreign_key.sql
+++ b/src/test/regress/sql/foreign_key.sql
@@ -1115,7 +1115,7 @@ ALTER TABLE ONLY fk_partitioned_fk ADD FOREIGN KEY (a, b)
 ALTER TABLE fk_partitioned_fk ADD FOREIGN KEY (a, b)
   REFERENCES fk_notpartitioned_pk NOT VALID;
 
--- these inserts, targetting both the partition directly as well as the
+-- these inserts, targeting both the partition directly as well as the
 -- partitioned table, should all fail
 INSERT INTO fk_partitioned_fk (a,b) VALUES (500, 501);
 INSERT INTO fk_partitioned_fk_1 (a,b) VALUES (500, 501);
diff --git a/src/test/regress/sql/privileges.sql b/src/test/regress/sql/privileges.sql
index cf9fa9f782..0d5c2cac24 100644
--- a/src/test/regress/sql/privileges.sql
+++ b/src/test/regress/sql/privileges.sql
@@ -495,7 +495,7 @@ GRANT ALL PRIVILEGES ON LANGUAGE sql TO PUBLIC;
 BEGIN;
 SELECT '{1}'::int4[]::int8[];
 REVOKE ALL ON FUNCTION int8(integer) FROM PUBLIC;
-SELECT '{1}'::int4[]::int8[]; --superuser, suceed
+SELECT '{1}'::int4[]::int8[]; --superuser, succeed
 SET SESSION AUTHORIZATION regress_priv_user4;
 SELECT '{1}'::int4[]::int8[]; --other user, fail
 ROLLBACK;
diff --git a/src/test/subscription/t/004_sync.pl b/src/test/subscription/t/004_sync.pl
index 6677dde528..f8b8f1a3d2 100644
--- a/src/test/subscription/t/004_sync.pl
+++ b/src/test/subscription/t/004_sync.pl
@@ -116,7 +116,7 @@ is($result, qq(20), 'initial data synced for fourth sub');
 # add new table on subscriber
 $node_subscriber->safe_psql('postgres', "CREATE TABLE tab_rep_next (a int)");
 
-# setup structure with existing data on pubisher
+# setup structure with existing data on publisher
 $node_publisher->safe_psql('postgres',
 	"CREATE TABLE tab_rep_next (a) AS SELECT generate_series(1,10)");
 
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 59bed3b8a8..708579d9df 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -630,7 +630,7 @@ sub mkvcbuild
 				{
 
 					# Some builds exhibit runtime failure through Perl warning
-					# 'Can't spawn "conftest.exe"'; supress that.
+					# 'Can't spawn "conftest.exe"'; suppress that.
 					no warnings;
 
 					# Disable error dialog boxes like we do in the postmaster.
-- 
2.14.1.145.gb3622a4ee

