diff --git a/contrib/bloom/blutils.c b/contrib/bloom/blutils.c
index ee3bd56274..cc1670934f 100644
--- a/contrib/bloom/blutils.c
+++ b/contrib/bloom/blutils.c
@@ -341,7 +341,7 @@ BloomPageAddItem(BloomState *state, Page page, BloomTuple *tuple)
 /*
  * Allocate a new page (either by recycling, or by extending the index file)
  * The returned buffer is already pinned and exclusive-locked
- * Caller is responsible for initializing the page by calling BloomInitBuffer
+ * Caller is responsible for initializing the page by calling BloomInitPage
  */
 Buffer
 BloomNewBuffer(Relation index)
diff --git a/src/backend/access/brin/brin_tuple.c b/src/backend/access/brin/brin_tuple.c
index 5abb472ee4..7e9e73d2cf 100644
--- a/src/backend/access/brin/brin_tuple.c
+++ b/src/backend/access/brin/brin_tuple.c
@@ -207,7 +207,7 @@ brin_form_tuple(BrinDesc *brdesc, BlockNumber blkno, BrinMemTuple *tuple,
 		/*
 		 * Note that we reverse the sense of null bits in this module: we
 		 * store a 1 for a null attribute rather than a 0.  So we must reverse
-		 * the sense of the att_isnull test in br_deconstruct_tuple as well.
+		 * the sense of the att_isnull test in brin_deconstruct_tuple as well.
 		 */
 		bitP = ((bits8 *) ((char *) rettuple + SizeOfBrinTuple)) - 1;
 		bitmask = HIGHBIT;
diff --git a/src/backend/postmaster/bgworker.c b/src/backend/postmaster/bgworker.c
index f5db5a8c4a..b66b517aca 100644
--- a/src/backend/postmaster/bgworker.c
+++ b/src/backend/postmaster/bgworker.c
@@ -525,7 +525,7 @@ ResetBackgroundWorkerCrashTimes(void)
 		if (rw->rw_worker.bgw_restart_time == BGW_NEVER_RESTART)
 		{
 			/*
-			 * Workers marked BGW_NVER_RESTART shouldn't get relaunched after
+			 * Workers marked BGW_NEVER_RESTART shouldn't get relaunched after
 			 * the crash, so forget about them.  (If we wait until after the
 			 * crash to forget about them, and they are parallel workers,
 			 * parallel_terminate_count will get incremented after we've
diff --git a/src/backend/storage/buffer/freelist.c b/src/backend/storage/buffer/freelist.c
index 06659ab265..c8d4e6f9e4 100644
--- a/src/backend/storage/buffer/freelist.c
+++ b/src/backend/storage/buffer/freelist.c
@@ -220,7 +220,7 @@ StrategyGetBuffer(BufferAccessStrategy strategy, uint32 *buf_state)
 	 * If asked, we need to waken the bgwriter. Since we don't want to rely on
 	 * a spinlock for this we force a read from shared memory once, and then
 	 * set the latch based on that value. We need to go through that length
-	 * because otherwise bgprocno might be reset while/after we check because
+	 * because otherwise bgwprocno might be reset while/after we check because
 	 * the compiler might just reread from memory.
 	 *
 	 * This can possibly set the latch of the wrong process if the bgwriter
diff --git a/src/backend/storage/ipc/barrier.c b/src/backend/storage/ipc/barrier.c
index 69ed034e52..83cbe33107 100644
--- a/src/backend/storage/ipc/barrier.c
+++ b/src/backend/storage/ipc/barrier.c
@@ -226,9 +226,9 @@ BarrierAttach(Barrier *barrier)
 }
 
 /*
- * Detach from a barrier.  This may release other waiters from BarrierWait and
- * advance the phase if they were only waiting for this backend.  Return true
- * if this participant was the last to detach.
+ * Detach from a barrier.  This may release other waiters from
+ * BarrierArriveAndWait() and advance the phase if they were only waiting for
+ * this backend.  Return true if this participant was the last to detach.
  */
 bool
 BarrierDetach(Barrier *barrier)
diff --git a/src/backend/utils/Gen_dummy_probes.pl b/src/backend/utils/Gen_dummy_probes.pl
index a662775cc1..a4b58ad69f 100644
--- a/src/backend/utils/Gen_dummy_probes.pl
+++ b/src/backend/utils/Gen_dummy_probes.pl
@@ -14,7 +14,7 @@
 #
 #-------------------------------------------------------------------------
 
-# turn off perlcritic for autogened code
+# turn off perlcritic for autogenerated code
 ## no critic
 
 $0 =~ s/^.*?(\w+)[\.\w+]*$/$1/;
diff --git a/src/include/access/attnum.h b/src/include/access/attnum.h
index f16441a587..093eee86c6 100644
--- a/src/include/access/attnum.h
+++ b/src/include/access/attnum.h
@@ -55,7 +55,7 @@ typedef int16 AttrNumber;
 )
 
 /*
- * AttributeOffsetGetAttributeNumber
+ * AttrOffsetGetAttrNumber
  *		Returns the attribute number for an attribute offset.
  */
 #define AttrOffsetGetAttrNumber(attributeOffset) \
diff --git a/src/include/funcapi.h b/src/include/funcapi.h
index ebba8b6f54..1a88b52087 100644
--- a/src/include/funcapi.h
+++ b/src/include/funcapi.h
@@ -252,7 +252,7 @@ extern Datum HeapTupleHeaderGetDatum(HeapTupleHeader tuple);
  *		oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
  *		<user defined code>
  *		<if returning composite>
- *			<build TupleDesc, and perhaps AttInMetaData>
+ *			<build TupleDesc, and perhaps AttInMetadata>
  *		<endif returning composite>
  *		<user defined code>
  *		// return to original context when allocating transient memory
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c
index bb04e27e2f..ab227421b3 100644
--- a/src/interfaces/libpq/fe-auth.c
+++ b/src/interfaces/libpq/fe-auth.c
@@ -717,7 +717,7 @@ pg_password_sendauth(PGconn *conn, const char *password, AuthRequest areq)
 	const char *pwd_to_send;
 	char		md5Salt[4];
 
-	/* Read the salt from the AuthenticationMD5 message. */
+	/* Read the salt from the AuthenticationMD5Password message. */
 	if (areq == AUTH_REQ_MD5)
 	{
 		if (pqGetnchar(md5Salt, 4, conn))
@@ -897,7 +897,7 @@ pg_fe_sendauth(AuthRequest areq, int payloadlen, PGconn *conn)
 			/*
 			 * No SSPI support. However, if we have GSSAPI but not SSPI
 			 * support, AUTH_REQ_SSPI will have been handled in the codepath
-			 * for AUTH_REQ_GSSAPI above, so don't duplicate the case label in
+			 * for AUTH_REQ_GSS above, so don't duplicate the case label in
 			 * that case.
 			 */
 #if !defined(ENABLE_GSS)
