diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c
index 97b911679c..05c6ca81b9 100644
--- a/src/backend/catalog/namespace.c
+++ b/src/backend/catalog/namespace.c
@@ -504,9 +504,9 @@ RangeVarGetCreationNamespace(const RangeVar *newRelation)
  * permission on the target namespace, this function will instead signal
  * an ERROR.
  *
- * If non-NULL, *existing_oid is set to the OID of any existing relation with
- * the same name which already exists in that namespace, or to InvalidOid if
- * no such relation exists.
+ * If non-NULL, *existing_relation_id is set to the OID of any existing relation
+ * with the same name which already exists in that namespace, or to InvalidOid
+ * if no such relation exists.
  *
  * If lockmode != NoLock, the specified lock mode is acquired on the existing
  * relation, if any, provided that the current user owns the target relation.
diff --git a/src/backend/executor/README b/src/backend/executor/README
index 05f197bc75..18b2ac1865 100644
--- a/src/backend/executor/README
+++ b/src/backend/executor/README
@@ -186,9 +186,9 @@ Expression Evaluation
 
 To allow for different methods of expression evaluation, and for
 better branch/jump target prediction, expressions are evaluated by
-calling ExprState->evalfunc (via ExprEvalExpr() and friends).
+calling ExprState->evalfunc (via ExecEvalExpr() and friends).
 
-ExprReadyExpr() can choose the method of interpretation by setting
+ExecReadyExpr() can choose the method of interpretation by setting
 evalfunc to an appropriate function.  The default execution function,
 ExecInterpExpr, is implemented in execExprInterp.c; see its header
 comment for details.  Special-case evalfuncs are used for certain
diff --git a/src/backend/executor/nodeValuesscan.c b/src/backend/executor/nodeValuesscan.c
index 0069a73588..a7bf4a7636 100644
--- a/src/backend/executor/nodeValuesscan.c
+++ b/src/backend/executor/nodeValuesscan.c
@@ -16,7 +16,7 @@
 /*
  * INTERFACE ROUTINES
  *		ExecValuesScan			scans a values list.
- *		ExecValuesNext			retrieve next tuple in sequential order.
+ *		ValuesNext			retrieve next tuple in sequential order.
  *		ExecInitValuesScan		creates and initializes a valuesscan node.
  *		ExecEndValuesScan		releases any storage allocated.
  *		ExecReScanValuesScan	rescans the values list
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 64acc3fa43..58c94e9257 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -1163,9 +1163,6 @@ _mdfd_getseg(SMgrRelation reln, ForkNumber forknum, BlockNumber blkno,
 			 * replaying WAL data that has a write into a high-numbered
 			 * segment of a relation that was later deleted. We want to go
 			 * ahead and create the segments so we can finish out the replay.
-			 * However if the caller has specified
-			 * EXTENSION_REALLY_RETURN_NULL, then extension is not desired
-			 * even in recovery; we won't reach this point in that case.
 			 *
 			 * We have to maintain the invariant that segments before the last
 			 * active segment are of size RELSEG_SIZE; therefore, if
diff --git a/src/bin/pg_dump/pg_backup_db.c b/src/bin/pg_dump/pg_backup_db.c
index 9d33c86a3b..401e0c8883 100644
--- a/src/bin/pg_dump/pg_backup_db.c
+++ b/src/bin/pg_dump/pg_backup_db.c
@@ -378,7 +378,7 @@ notice_processor(void *arg, const char *message)
 	pg_log_generic(PG_LOG_INFO, "%s", message);
 }
 
-/* Like exit_fatal(), but with a complaint about a particular query. */
+/* Like fatal(), but with a complaint about a particular query. */
 static void
 die_on_query_failure(ArchiveHandle *AH, const char *query)
 {
diff --git a/src/include/access/timeline.h b/src/include/access/timeline.h
index a6dc2edb89..e83a73a3f1 100644
--- a/src/include/access/timeline.h
+++ b/src/include/access/timeline.h
@@ -36,7 +36,7 @@ extern void writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
 								 XLogRecPtr switchpoint, char *reason);
 extern void writeTimeLineHistoryFile(TimeLineID tli, char *content, int size);
 extern void restoreTimeLineHistoryFiles(TimeLineID begin, TimeLineID end);
-extern bool tliInHistory(TimeLineID tli, List *expectedTLIs);
+extern bool tliInHistory(TimeLineID tli, List *expectedTLEs);
 extern TimeLineID tliOfPointInHistory(XLogRecPtr ptr, List *history);
 extern XLogRecPtr tliSwitchPoint(TimeLineID tli, List *history,
 								 TimeLineID *nextTLI);
diff --git a/src/include/partitioning/partprune.h b/src/include/partitioning/partprune.h
index 81318c785a..b3e926865a 100644
--- a/src/include/partitioning/partprune.h
+++ b/src/include/partitioning/partprune.h
@@ -60,10 +60,10 @@ typedef struct PartitionPruneContext
 } PartitionPruneContext;
 
 /*
- * PruneCxtStateIdx() computes the correct index into the stepcmpfuncs[],
- * exprstates[] and exprhasexecparam[] arrays for step step_id and
- * partition key column keyno.  (Note: there is code that assumes the
- * entries for a given step are sequential, so this is not chosen freely.)
+ * PruneCxtStateIdx() computes the correct index into the stepcmpfuncs[]
+ * and exprstates[] arrays for step step_id and partition key column keyno.
+ * (Note: there is code that assumes the entries for a given step are
+ * sequential, so this is not chosen freely.)
  */
 #define PruneCxtStateIdx(partnatts, step_id, keyno) \
 	((partnatts) * (step_id) + (keyno))
