diff --git a/contrib/ctidscan/ctidscan.c b/contrib/ctidscan/ctidscan.c
index 0c6e6c0..72bbf17 100644
--- a/contrib/ctidscan/ctidscan.c
+++ b/contrib/ctidscan/ctidscan.c
@@ -8,7 +8,7 @@
  * to fetch records with tid larger or less than a particular value.
  * In case when inequality operators were given, this module construct
  * a custom scan path that enables to skip records not to be read. Then,
- * if it was the chepest one, it shall be used to run the query.
+ * if it was the cheapest one, it shall be used to run the query.
  * Custom Scan APIs callbacks this extension when executor tries to fetch
  * underlying records, then it utilizes existing heap_getnext() but seek
  * the records to be read prior to fetching the first record.
@@ -53,7 +53,7 @@ static add_scan_path_hook_type	add_scan_path_next;
  * It checks whether the given restriction clauses enables to determine
  * the zone to be scanned, or not. If one or more restriction clauses are
  * available, it returns a list of them, or NIL elsewhere.
- * The caller can consider all the conditions are chainned with AND-
+ * The caller can consider all the conditions are chained with AND-
  * boolean operator, so all the operator works for narrowing down the
  * scope of custom tid scan.
  */
@@ -245,7 +245,7 @@ CTidEstimateCosts(PlannerInfo *root,
 
 	/*
 	 * The TID qual expressions will be computed once, any other baserestrict
-	 * quals once per retrived tuple.
+	 * quals once per retrieved tuple.
 	 */
 	cost_qual_eval(&ctid_qual_cost, ctidquals, root);
 
@@ -350,7 +350,7 @@ CTidAddScanPath(PlannerInfo *root,
  * CTidInitCustomScanPlan
  *
  * It initializes the given CustomScan plan object according to the CustomPath
- * being choosen by the optimizer.
+ * being chosen by the optimizer.
  */
 static void
 CTidInitCustomScanPlan(PlannerInfo *root,
@@ -491,7 +491,7 @@ CTidEvalScanZone(CustomScanState *node)
 		else
 		{
 			/*
-			 * Whole of the restriction clauses chainned with AND- boolean
+			 * Whole of the restriction clauses chained with AND- boolean
 			 * operators because false, if one of the clauses has NULL result.
 			 * So, we can immediately break the evaluation to inform caller
 			 * it does not make sense to scan any more.
@@ -519,7 +519,7 @@ CTidBeginCustomScan(CustomScanState *node, int eflags)
 	if (eflags & EXEC_FLAG_EXPLAIN_ONLY)
 		return;
 
-	/* Begin sequential scan, but pointer shall be seeked later */
+	/* Begin sequential scan, but pointer shall be sought later */
 	node->ss.ss_currentScanDesc
 		= heap_beginscan(node->ss.ss_currentRelation,
 						 estate->es_snapshot, 0, NULL);
@@ -538,7 +538,7 @@ CTidBeginCustomScan(CustomScanState *node, int eflags)
  * CTidSeekPosition
  *
  * It seeks current scan position into a particular point we specified.
- * Next heap_getnext() will fetch a record from the point we seeked.
+ * Next heap_getnext() will fetch a record from the point we sought.
  * It returns false, if specified position was out of range thus does not
  * make sense to scan any mode. Elsewhere, true shall be return.
  */
@@ -635,7 +635,7 @@ CTidAccessCustomScan(CustomScanState *node)
 		}
 		else if (direction == BackwardScanDirection)
 		{
-			/* seel to the point if max-tid was obvious */
+			/* seek to the point if max-tid was obvious */
 			if (ctss->ip_max_comp != 1)
 			{
 				if (CTidSeekPosition(scan, &ctss->ip_max, direction))
diff --git a/doc/src/sgml/ctidscan.sgml b/doc/src/sgml/ctidscan.sgml
index 60081f7..e4afaa7 100644
--- a/doc/src/sgml/ctidscan.sgml
+++ b/doc/src/sgml/ctidscan.sgml
@@ -1,7 +1,7 @@
 <!-- doc/src/sgml/ctidscan.sgml -->
 
 <sect1 id="ctidscan" xreflabel="ctidscan">
- <title>lo</title>
+ <title>ctidscan</title>
 
  <indexterm zone="ctidscan">
   <primary>ctidscan</primary>
@@ -54,7 +54,7 @@ postgres=# EXPLAIN SELECT * FROM t1 WHERE ctid > '(100,0)'::tid;
   <para>
    On the other hands, an alternative scan path implemented with
    <filename>ctidscan</> provides more efficient way; that skips the first
-   100 pages prior to sequencial scan, as follows.
+   100 pages prior to sequential scan, as follows.
 <programlisting>
 postgres=# load 'ctidscan';
 LOAD
@@ -71,7 +71,7 @@ postgres=# EXPLAIN SELECT * FROM t1 WHERE ctid > '(100,0)'::tid;
    smaller number of tuples to be processed.
   </para>
   <para>
-   Of course, it shall not be choosen if we have more cheaper path than the
+   Of course, it shall not be chosen if we have more cheaper path than the
    above custom-scan path. Index-scan based on equality operation is usually
    cheaper than this custom-scan, so optimizer adopts it instead of sequential
    scan or custom scan provided by <filename>ctidscan</> for instance.
diff --git a/doc/src/sgml/custom-scan.sgml b/doc/src/sgml/custom-scan.sgml
index b57d82f..f53902d 100644
--- a/doc/src/sgml/custom-scan.sgml
+++ b/doc/src/sgml/custom-scan.sgml
@@ -18,7 +18,7 @@
   Overall, there are four major tasks that a custom-scan provider should 
   implement. The first task is the registration of custom-scan provider itself.
   Usually, this needs to be done once at the <literal>_PG_init()</literal> 
-  entrypoint when the module is loading. The remaing three tasks are all done
+  entrypoint when the module is loading. The reaming three tasks are all done
   when a query is planning and executing. The second task is the submission of
   candidate paths to either scan or join relations with an adequate cost for
   the core planner. Then, the planner will choose the cheapest path from all of
@@ -50,7 +50,7 @@
      <para>
       This custom scan in this module replaces a local join of foreign tables
       managed by <literal>postgres_fdw</literal> with a scan that fetches
-      remotely joined relations. It demostrates the way to implement a custom
+      remotely joined relations. It demonstrates the way to implement a custom
       scan node that performs join nodes.
      </para>
     </listitem>
@@ -145,7 +145,7 @@ typedef struct CustomPath
   <sect2 id="custom-scan-plan">
    <title>Construction of custom plan node</title>
    <para>
-    Once <literal>CustomPath</literal> was choosen by the query planner,
+    Once <literal>CustomPath</literal> was chosen by the query planner,
     it calls back to its associated to the custom scan provider to complete 
     setting up the <literal>CustomScan</literal> plan node according to the
     path information.
@@ -160,7 +160,7 @@ InitCustomScanPlan(PlannerInfo *root,
     The query planner does basic initialization on the <literal>cscan_plan</>
     being allocated, then the custom scan provider can apply final 
     initialization. <literal>cscan_path</> is the path node that was 
-    constructed on the previous stage then was choosen.
+    constructed on the previous stage then was chosen.
     <literal>tlist</> is a list of <literal>TargetEntry</> to be assigned
     on the <literal>Plan</> portion in the <literal>cscan_plan</>.
     Also, <literal>scan_clauses</> is a list of <literal>RestrictInfo</> to
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 33bab08..e55b16e 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -974,7 +974,7 @@ cost_tidscan(Path *path, PlannerInfo *root,
 
 	/*
 	 * The TID qual expressions will be computed once, any other baserestrict
-	 * quals once per retrived tuple.
+	 * quals once per retrieved tuple.
 	 */
 	cost_qual_eval(&tid_qual_cost, tidquals, root);
 
diff --git a/src/test/regress/input/custom_scan.source b/src/test/regress/input/custom_scan.source
index 1ad0e7a..a5a205d 100644
--- a/src/test/regress/input/custom_scan.source
+++ b/src/test/regress/input/custom_scan.source
@@ -45,5 +45,5 @@ SELECT ctid,* FROM t1 WHERE ctid > '(4,0)'::tid;
 SELECT ctid,* FROM t1 WHERE ctid BETWEEN '(2,115)'::tid AND '(3,10)'::tid;
 SELECT t1.ctid,* FROM t1 JOIN t2 ON t1.ctid = t2.ctid WHERE t1.ctid < '(2,10)'::tid AND t2.ctid > '(1,75)'::tid;
 
--- Test creanup
+-- Test cleanup
 DROP SCHEMA regtest_custom_scan CASCADE;
\ No newline at end of file
diff --git a/src/test/regress/output/custom_scan.source b/src/test/regress/output/custom_scan.source
index 09c1bda..fc13e9f 100644
--- a/src/test/regress/output/custom_scan.source
+++ b/src/test/regress/output/custom_scan.source
@@ -283,7 +283,7 @@ SELECT t1.ctid,* FROM t1 JOIN t2 ON t1.ctid = t2.ctid WHERE t1.ctid < '(2,10)'::
  (2,9)  | 249 | 077e29b11be80ab57e1a2ecabb7da330 | 171 | a4a042cf4fd6bfb47701cbc8a1653adaa4a042cf4fd6bfb47701cbc8a1653ada
 (15 rows)
 
--- Test creanup
+-- Test cleanup
 DROP SCHEMA regtest_custom_scan CASCADE;
 NOTICE:  drop cascades to 2 other objects
 DETAIL:  drop cascades to table t1
