diff --git a/contrib/pgcrypto/internal.c b/contrib/pgcrypto/internal.c
index 16dfe725ea..db58408d4c 100644
--- a/contrib/pgcrypto/internal.c
+++ b/contrib/pgcrypto/internal.c
@@ -39,25 +39,6 @@
 #include "blf.h"
 #include "rijndael.h"
 
-/*
- * System reseeds should be separated at least this much.
- */
-#define SYSTEM_RESEED_MIN			(20*60) /* 20 min */
-/*
- * How often to roll dice.
- */
-#define SYSTEM_RESEED_CHECK_TIME	(10*60) /* 10 min */
-/*
- * The chance is x/256 that the reseed happens.
- */
-#define SYSTEM_RESEED_CHANCE		(4) /* 256/4 * 10min ~ 10h */
-
-/*
- * If this much time has passed, force reseed.
- */
-#define SYSTEM_RESEED_MAX			(12*60*60)	/* 12h */
-
-
 #ifndef MD5_DIGEST_LENGTH
 #define MD5_DIGEST_LENGTH 16
 #endif
diff --git a/contrib/pgcrypto/pgp-decrypt.c b/contrib/pgcrypto/pgp-decrypt.c
index eed0f6ad2d..142c3f2588 100644
--- a/contrib/pgcrypto/pgp-decrypt.c
+++ b/contrib/pgcrypto/pgp-decrypt.c
@@ -423,7 +423,7 @@ static struct PullFilterOps mdc_filter = {
 /*
  * Combined Pkt reader and MDC hasher.
  *
- * For the case of SYMENCRYPTED_MDC packet, where
+ * For the case of SYMENCRYPTED_DATA_MDC packet, where
  * the data part has 'context length', which means
  * that data packet ends 22 bytes before end of parent
  * packet, which is silly.
@@ -894,7 +894,10 @@ process_data_packets(PGP_Context *ctx, MBuf *dst, PullFilter *src,
 			break;
 		}
 
-		/* context length inside SYMENC_MDC needs special handling */
+		/*
+		 * context length inside SYMENCRYPTED_DATA_MDC packet needs
+		 * special handling
+		 */
 		if (need_mdc && res == PKT_CONTEXT)
 			res = pullf_create(&pkt, &mdcbuf_filter, ctx, src);
 		else
diff --git a/contrib/pgcrypto/pgp-encrypt.c b/contrib/pgcrypto/pgp-encrypt.c
index 8a6cd82675..2938b4b3f5 100644
--- a/contrib/pgcrypto/pgp-encrypt.c
+++ b/contrib/pgcrypto/pgp-encrypt.c
@@ -618,7 +618,7 @@ pgp_encrypt(PGP_Context *ctx, MBuf *src, MBuf *dst)
 		goto out;
 
 	/*
-	 * initialize symkey
+	 * initialize sym_key
 	 */
 	if (ctx->sym_key)
 	{
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index ef1556be8f..d491235f7f 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -5626,7 +5626,7 @@ BEGIN
     INSERT INTO cs_active_job(job_id) VALUES (v_job_id);
 
     BEGIN
-        INSERT INTO cs_jobs (job_id, start_stamp) VALUES (v_job_id, sysdate);
+        INSERT INTO cs_jobs (job_id, start_stamp) VALUES (v_job_id, now());
     EXCEPTION
         WHEN dup_val_on_index THEN NULL; -- don't worry if it already exists
     END;
diff --git a/src/backend/access/brin/brin_revmap.c b/src/backend/access/brin/brin_revmap.c
index e2bfbf8a68..a04288eb6b 100644
--- a/src/backend/access/brin/brin_revmap.c
+++ b/src/backend/access/brin/brin_revmap.c
@@ -395,9 +395,10 @@ brinRevmapDesummarizeRange(Relation idxrel, BlockNumber heapBlk)
 	 */
 
 	/*
-	 * Because of SUE lock, this function shouldn't run concurrently with
-	 * summarization.  Placeholder tuples can only exist as leftovers from
-	 * crashed summarization, so if we detect any, we complain but proceed.
+	 * Because of ShareUpdateExclusive lock, this function shouldn't run
+	 * iconcurrently with summarization.  Placeholder tuples can only exist
+	 * as leftovers from crashed summarization, so if we detect any,
+	 * we complain but proceed.
 	 */
 	if (BrinTupleIsPlaceholder(tup))
 		ereport(WARNING,
diff --git a/src/backend/lib/rbtree.c b/src/backend/lib/rbtree.c
index 33181e9211..d439ec189f 100644
--- a/src/backend/lib/rbtree.c
+++ b/src/backend/lib/rbtree.c
@@ -7,8 +7,8 @@
  * This code comes from Thomas Niemann's "Sorting and Searching Algorithms:
  * a Cookbook".
  *
- * See http://www.cs.auckland.ac.nz/software/AlgAnim/niemann/s_man.htm for
- * license terms: "Source code, when part of a software project, may be used
+ * See https://www.epaperpress.com/sortsearch/ for license terms:
+ * "Source code, when part of a software project, may be used
  * freely without reference to the author."
  *
  * Red-black trees are a type of balanced binary tree wherein (1) any child of
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 43edfef089..11e6331f49 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -1658,7 +1658,7 @@ ApplyWorkerMain(Datum main_arg)
 	{
 		char	   *syncslotname;
 
-		/* This is table synchroniation worker, call initial sync. */
+		/* This is table synchronization worker, call initial sync. */
 		syncslotname = LogicalRepSyncTableStart(&origin_startpos);
 
 		/* The slot name needs to be allocated in permanent memory context. */
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c
index d378053de4..15e3eab550 100644
--- a/src/bin/pg_rewind/pg_rewind.c
+++ b/src/bin/pg_rewind/pg_rewind.c
@@ -404,7 +404,7 @@ sanityChecks(void)
 {
 	/* TODO Check that there's no backup_label in either cluster */
 
-	/* Check system_id match */
+	/* Check system_identifier match */
 	if (ControlFile_target.system_identifier != ControlFile_source.system_identifier)
 		pg_fatal("source and target clusters are from different systems");
 
diff --git a/src/tools/pgindent/README b/src/tools/pgindent/README
index 00bffcf005..8eb15fafb9 100644
--- a/src/tools/pgindent/README
+++ b/src/tools/pgindent/README
@@ -31,7 +31,7 @@ DOING THE INDENT RUN:
 
 	wget -O src/tools/pgindent/typedefs.list https://buildfarm.postgresql.org/cgi-bin/typedefs.pl
 
-   (See https://www.pgbuildfarm.org/cgi-bin/typedefs.pl?show_list for a full
+   (See https://buildfarm.postgresql.org/cgi-bin/typedefs.pl?show_list for a full
    list of typedef files, if you want to indent some back branch.)
 
 3) Run pgindent on the C files:
