diff --git a/src/backend/access/gin/ginvacuum.c b/src/backend/access/gin/ginvacuum.c
index dc46f2460e..d4f8044b3a 100644
--- a/src/backend/access/gin/ginvacuum.c
+++ b/src/backend/access/gin/ginvacuum.c
@@ -127,7 +127,7 @@ typedef struct DataPageDeleteStack
  */
 static void
 ginDeletePage(GinVacuumState *gvs, BlockNumber deleteBlkno, BlockNumber leftBlkno,
-			  BlockNumber parentBlkno, OffsetNumber myoff, bool isParentRoot)
+			  BlockNumber parentBlkno, OffsetNumber myoff)
 {
 	Buffer		dBuffer;
 	Buffer		lBuffer;
@@ -301,7 +301,7 @@ ginScanToDelete(GinVacuumState *gvs, BlockNumber blkno, bool isRoot,
 		if (me->leftBlkno != InvalidBlockNumber && !GinPageRightMost(page))
 		{
 			Assert(!isRoot);
-			ginDeletePage(gvs, blkno, me->leftBlkno, me->parent->blkno, myoff, me->parent->isRoot);
+			ginDeletePage(gvs, blkno, me->leftBlkno, me->parent->blkno, myoff);
 			meDelete = true;
 		}
 	}
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index ee878d70a9..2d9a8e9d54 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -775,7 +775,7 @@ CreateTrigger(CreateTrigStmt *stmt, const char *queryString,
 											  NULL,
 											  true, /* islocal */
 											  0,	/* inhcount */
-											  true, /* isnoinherit */
+											  true, /* noinherit */
 											  isInternal);	/* is_internal */
 	}
 
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index cb4ab4b21e..2342ca3018 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -2988,8 +2988,8 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
 		numTransArgs = pertrans->numTransInputs + 1;
 
 		/*
-		 * Set up infrastructure for calling the transfn.  Note that invtrans
-		 * is not needed here.
+		 * Set up infrastructure for calling the transfn.  Note that
+		 * invtransfn is not needed here.
 		 */
 		build_aggregate_transfn_expr(inputTypes,
 									 numArguments,
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index 74f8d89bcb..b8eb83b2e0 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -2369,7 +2369,7 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
 			/*
 			 * The last canSetTag query sets the status values returned to the
 			 * caller.  Be careful to free any tuptables not returned, to
-			 * avoid intratransaction memory leak.
+			 * avoid intra-transaction memory leak.
 			 */
 			if (canSetTag)
 			{
diff --git a/src/backend/port/win32_sema.c b/src/backend/port/win32_sema.c
index f08fbd1690..013c122451 100644
--- a/src/backend/port/win32_sema.c
+++ b/src/backend/port/win32_sema.c
@@ -127,7 +127,6 @@ PGSemaphoreReset(PGSemaphore sema)
  * PGSemaphoreLock
  *
  * Lock a semaphore (decrement count), blocking if count would be < 0.
- * Serve the interrupt if interruptOK is true.
  */
 void
 PGSemaphoreLock(PGSemaphore sema)
diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c
index 4f7bafd142..696a7fdf91 100644
--- a/src/backend/utils/adt/tsvector_op.c
+++ b/src/backend/utils/adt/tsvector_op.c
@@ -1152,7 +1152,7 @@ tsvector_concat(PG_FUNCTION_ARGS)
 /*
  * Compare two strings by tsvector rules.
  *
- * if isPrefix = true then it returns zero value iff b has prefix a
+ * if prefix = true then it returns zero value iff b has prefix a
  */
 int32
 tsCompareString(char *a, int lena, char *b, int lenb, bool prefix)
diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c
index 9b640ccd40..99c34516bd 100644
--- a/src/backend/utils/fmgr/fmgr.c
+++ b/src/backend/utils/fmgr/fmgr.c
@@ -217,7 +217,7 @@ fmgr_info_cxt_security(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt,
 
 			/*
 			 * For an ordinary builtin function, we should never get here
-			 * because the isbuiltin() search above will have succeeded.
+			 * because the fmgr_isbuiltin() search above will have succeeded.
 			 * However, if the user has done a CREATE FUNCTION to create an
 			 * alias for a builtin function, we can end up here.  In that case
 			 * we have to look up the function by name.  The name of the
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index ef9fc15ac3..6690d78137 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -1093,7 +1093,7 @@ AtEOXact_Snapshot(bool isCommit, bool resetXmin)
 		 * prevent a warning below.
 		 *
 		 * As with the FirstXactSnapshot, we don't need to free resources of
-		 * the snapshot iself as it will go away with the memory context.
+		 * the snapshot itself as it will go away with the memory context.
 		 */
 		foreach(lc, exportedSnapshots)
 		{
diff --git a/src/include/access/spgist_private.h b/src/include/access/spgist_private.h
index 4a38938732..e0d1178f24 100644
--- a/src/include/access/spgist_private.h
+++ b/src/include/access/spgist_private.h
@@ -328,7 +328,7 @@ typedef struct SpGistLeafTupleData
 {
 	unsigned int tupstate:2,	/* LIVE/REDIRECT/DEAD/PLACEHOLDER */
 				size:30;		/* large enough for any palloc'able value */
-	OffsetNumber nextOffset;	/* next tuple in chain, or InvalidOffset */
+	OffsetNumber nextOffset;	/* next tuple in chain, or InvalidOffsetNumber */
 	ItemPointerData heapPtr;	/* TID of represented heap tuple */
 	/* leaf datum follows */
 } SpGistLeafTupleData;
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index efd9f3aa71..a66a7a16af 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -275,8 +275,8 @@ PGTYPEStimestamp_to_asc(timestamp tstamp)
 			   *tm = &tt;
 	char		buf[MAXDATELEN + 1];
 	fsec_t		fsec;
-	int			DateStyle = 1;	/* this defaults to ISO_DATES, shall we make
-								 * it an option? */
+	int			DateStyle = 1;	/* this defaults to USE_ISO_DATES,
+						 * shall we make it an option? */
 
 	if (TIMESTAMP_NOT_FINITE(tstamp))
 		EncodeSpecialTimestamp(tstamp, buf);
