diff --git a/src/backend/access/gin/README b/src/backend/access/gin/README
index 838fdc0d63..76c12ae2f6 100644
--- a/src/backend/access/gin/README
+++ b/src/backend/access/gin/README
@@ -270,7 +270,7 @@ is stored in the higher bits. That requires 43 bits in total, which
 conveniently fits in at most 6 bytes.
 
 A compressed posting list is passed around and stored on disk in a
-PackedPostingList struct. The first item in the list is stored uncompressed
+GinPostingList struct. The first item in the list is stored uncompressed
 as a regular ItemPointerData, followed by the length of the list in bytes,
 followed by the packed items.
 
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c
index 4e0c500a22..1d3b022b34 100644
--- a/src/backend/access/gist/gistget.c
+++ b/src/backend/access/gist/gistget.c
@@ -74,7 +74,7 @@ gistkillitems(IndexScanDesc scan)
 
 	/*
 	 * Mark all killedItems as dead. We need no additional recheck, because,
-	 * if page was modified, pageLSN must have changed.
+	 * if page was modified, curPageLSN must have changed.
 	 */
 	for (i = 0; i < so->numKilled; i++)
 	{
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index f5d56138ee..cf4387e40f 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -144,7 +144,7 @@ EstimateParamListSpace(ParamListInfo paramLI)
 }
 
 /*
- * Serialize a paramListInfo structure into caller-provided storage.
+ * Serialize a ParamListInfo structure into caller-provided storage.
  *
  * We write the number of parameters first, as a 4-byte integer, and then
  * write details for each parameter in turn.  The details for each parameter
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 8f51f59f8a..dacd757c24 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -4242,7 +4242,7 @@ consider_groupingsets_paths(PlannerInfo *root,
 		 * 2) If there are no empty sets and only unsortable sets, then the
 		 * rollups list will be empty (and thus l_start == NULL), and
 		 * group_pathkeys will be NIL; we must ensure that the vacuously-true
-		 * pathkeys_contain_in test doesn't cause us to crash.
+		 * pathkeys_contained_in test doesn't cause us to crash.
 		 */
 		if (l_start != NULL &&
 			pathkeys_contained_in(root->group_pathkeys, path->pathkeys))
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 09eabfbe5a..9c303e9cc4 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -1295,7 +1295,7 @@ setup_config(void)
 		err = WSAStartup(MAKEWORD(2, 2), &wsaData);
 #endif
 
-		/* for best results, this code should match parse_hba() */
+		/* for best results, this code should match parse_hba_line() */
 		hints.ai_flags = AI_NUMERICHOST;
 		hints.ai_family = AF_UNSPEC;
 		hints.ai_socktype = 0;
diff --git a/src/bin/psql/describe.h b/src/bin/psql/describe.h
index 17736c3782..b50c7d209c 100644
--- a/src/bin/psql/describe.h
+++ b/src/bin/psql/describe.h
@@ -31,7 +31,7 @@ extern bool describeOperators(const char *pattern, bool verbose, bool showSystem
 extern bool describeRoles(const char *pattern, bool verbose, bool showSystem);
 
 /* \drds */
-extern bool listDbRoleSettings(const char *pattern1, const char *pattern2);
+extern bool listDbRoleSettings(const char *pattern, const char *pattern2);
 
 /* \z (or \dp) */
 extern bool permissionsList(const char *pattern);
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 3f7001fb69..d40800709b 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -1686,7 +1686,7 @@ psql_completion(const char *text, int start, int end)
 
 	/* ALTER LANGUAGE <name> */
 	else if (Matches("ALTER", "LANGUAGE", MatchAny))
-		COMPLETE_WITH("OWNER_TO", "RENAME TO");
+		COMPLETE_WITH("OWNER TO", "RENAME TO");
 
 	/* ALTER LARGE OBJECT <oid> */
 	else if (Matches("ALTER", "LARGE", "OBJECT", MatchAny))
diff --git a/src/include/parser/parse_func.h b/src/include/parser/parse_func.h
index d1ec2d97f2..5a3b287eaf 100644
--- a/src/include/parser/parse_func.h
+++ b/src/include/parser/parse_func.h
@@ -11,8 +11,8 @@
  *
  *-------------------------------------------------------------------------
  */
-#ifndef PARSER_FUNC_H
-#define PARSER_FUNC_H
+#ifndef PARSE_FUNC_H
+#define PARSE_FUNC_H
 
 #include "catalog/namespace.h"
 #include "parser/parse_node.h"
diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h
index 4ef6d8ddd4..f18d703c7a 100644
--- a/src/include/storage/bufpage.h
+++ b/src/include/storage/bufpage.h
@@ -402,8 +402,6 @@ do { \
 		TransactionIdPrecedes(xid, ((PageHeader) (page))->pd_prune_xid)) \
 		((PageHeader) (page))->pd_prune_xid = (xid); \
 } while (0)
-#define PageClearPrunable(page) \
-	(((PageHeader) (page))->pd_prune_xid = InvalidTransactionId)
 
 
 /* ----------------------------------------------------------------
diff --git a/src/include/utils/jsonapi.h b/src/include/utils/jsonapi.h
index 5f4d479a7b..1c56acca55 100644
--- a/src/include/utils/jsonapi.h
+++ b/src/include/utils/jsonapi.h
@@ -94,7 +94,7 @@ typedef struct JsonSemAction
 } JsonSemAction;
 
 /*
- * parse_json will parse the string in the lex calling the
+ * pg_parse_json will parse the string in the lex calling the
  * action functions in sem at the appropriate points. It is
  * up to them to keep what state they need	in semstate. If they
  * need access to the state of the lexer, then its pointer
