diff --git a/src/backend/access/heap/tuptoaster.c b/src/backend/access/heap/tuptoaster.c
index 74233bb931..970e78d849 100644
--- a/src/backend/access/heap/tuptoaster.c
+++ b/src/backend/access/heap/tuptoaster.c
@@ -44,8 +44,6 @@
 #include "utils/typcache.h"
 
 
-#undef TOAST_DEBUG
-
 /*
  *	The information at the start of the compressed toast data.
  */
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 52e9643305..f594d33e7a 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -92,8 +92,8 @@ int			synchronous_commit = SYNCHRONOUS_COMMIT_ON;
  * in the user backend, so we need some additional bookkeeping.
  *
  * XactTopFullTransactionId stores the XID of our toplevel transaction, which
- * will be the same as TopTransactionState.fullTransactionId in an ordinary
- * backend; but in a parallel backend, which does not have the entire
+ * will be the same as TopTransactionStateData.fullTransactionId in an
+ * ordinary backend; but in a parallel backend, which does not have the entire
  * transaction state, it will instead be copied from the backend that started
  * the parallel operation.
  *
diff --git a/src/backend/executor/nodeTidscan.c b/src/backend/executor/nodeTidscan.c
index 83ece6bf56..8cf22d5bf0 100644
--- a/src/backend/executor/nodeTidscan.c
+++ b/src/backend/executor/nodeTidscan.c
@@ -432,7 +432,7 @@ TidRecheck(TidScanState *node, TupleTableSlot *slot)
  *		Initial States:
  *		  -- the relation indicated is opened for scanning so that the
  *			 "cursor" is positioned before the first qualifying tuple.
- *		  -- tidPtr is -1.
+ *		  -- tss_TidPtr is -1.
  * ----------------------------------------------------------------
  */
 static TupleTableSlot *
@@ -498,7 +498,7 @@ ExecEndTidScan(TidScanState *node)
  *		scan keys, and opens the base and tid relations.
  *
  *		Parameters:
- *		  node: TidNode node produced by the planner.
+ *		  node: TidScan node produced by the planner.
  *		  estate: the execution state initialized in InitPlan.
  * ----------------------------------------------------------------
  */
diff --git a/src/backend/tsearch/dict_synonym.c b/src/backend/tsearch/dict_synonym.c
index b6226df940..ba1582c451 100644
--- a/src/backend/tsearch/dict_synonym.c
+++ b/src/backend/tsearch/dict_synonym.c
@@ -37,7 +37,7 @@ typedef struct
  * Finds the next whitespace-delimited word within the 'in' string.
  * Returns a pointer to the first character of the word, and a pointer
  * to the next byte after the last character in the word (in *end).
- * Character '*' at the end of word will not be threated as word
+ * Character '*' at the end of word will not be treated as word
  * character if flags is not null.
  */
 static char *
diff --git a/src/backend/tsearch/ts_parse.c b/src/backend/tsearch/ts_parse.c
index 171ade273b..fb86ea2e08 100644
--- a/src/backend/tsearch/ts_parse.c
+++ b/src/backend/tsearch/ts_parse.c
@@ -282,7 +282,7 @@ LexizeExec(LexizeData *ld, ParsedLex **correspondLexem)
 				if (!dictExists)
 				{
 					/*
-					 * Dictionary can't work with current tpe of lexeme,
+					 * Dictionary can't work with current type of lexeme,
 					 * return to basic mode and redo all stored lexemes
 					 */
 					ld->curDictId = InvalidOid;
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index 61a24c2e3c..bc6e03fbc7 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -25,7 +25,7 @@
 
 #include <signal.h>
 
-#include "datatype/timestamp.h" /* for TimestampTZ */
+#include "datatype/timestamp.h" /* for TimestampTz */
 #include "pgtime.h"				/* for pg_time_t */
 
 
diff --git a/src/test/modules/test_rls_hooks/README b/src/test/modules/test_rls_hooks/README
index b61dace572..c22e0d3fb4 100644
--- a/src/test/modules/test_rls_hooks/README
+++ b/src/test/modules/test_rls_hooks/README
@@ -3,13 +3,13 @@ define additional policies to be used.
 
 Functions
 =========
-test_rls_hook_permissive(CmdType cmdtype, Relation relation)
+test_rls_hooks_permissive(CmdType cmdtype, Relation relation)
     RETURNS List*
 
 Returns a list of policies which should be added to any existing
 policies on the relation, combined with OR.
 
-test_rls_hook_restrictive(CmdType cmdtype, Relation relation)
+test_rls_hooks_restrictive(CmdType cmdtype, Relation relation)
     RETURNS List*
 
 Returns a list of policies which should be added to any existing
diff --git a/src/test/thread/thread_test.c b/src/test/thread/thread_test.c
index 5392439146..4fbba78ef6 100644
--- a/src/test/thread/thread_test.c
+++ b/src/test/thread/thread_test.c
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * test_thread_funcs.c
+ * thread_test.c
  *		libc thread test program
  *
  * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
diff --git a/src/timezone/localtime.c b/src/timezone/localtime.c
index 1d9244bc0a..333f27300a 100644
--- a/src/timezone/localtime.c
+++ b/src/timezone/localtime.c
@@ -36,7 +36,7 @@
  *		in which Daylight Saving Time is never observed.
  *	4.	They might reference tzname[0] after setting to a time zone
  *		in which Standard Time is never observed.
- *	5.	They might reference tm.TM_ZONE after calling offtime.
+ *	5.	They might reference tm.tm_zone after calling offtime.
  * What's best to do in the above cases is open to debate;
  * for now, we just set things up so that in any of the five cases
  * WILDABBR is used. Another possibility: initialize tzname[0] to the
