Hello hackers,

Please consider fixing the next heap of typos and inconsistencies in the
tree:

10.1. query_txt -> query text
10.2. quote_object_names -> quote_object_name
10.3. ragetypes_typanalyze.c -> rangetypes_typanalyze.c
10.4. RAISE_EXCEPTION -> ERRCODE_RAISE_EXCEPTION
10.5. rb_lower -> remove (orphaned since introduction in f0e44751)
10.6. rd_newRelfilenode -> rd_newRelfilenodeSubid
10.7. readfs -> readfds
10.8. readInt -> ReadInt
10.9. recoder, dst -> record, page
10.10. recync -> resync
10.11. RedoRecptr -> RedoRecPtr
10.12. referenting -> referencing
10.13. REG_PEND -> remove (orphaned since 7bcc6d98)
10.14. regreesion -> regression
10.15. REG_STARTEND -> remove (not used since the introduction in 985acb8e)
10.16. RelationGetOidIndex -> remove a comment (irrelevant since 578b2297)
10.17. relcheck -> relchecks
10.18. releasebuf -> unlockbuf
10.19. releaseOk -> RELEASE_OK flag
10.20. relevants -> relevant
10.21. relfile -> file
10.22. RelID -> Relation ID
10.23. ReplicationSlotShmemInit -> ReplicationSlotsShmemInit
10.24. res_items -> res_nitems
10.25. restablish -> reestablish
10.26. REWRITE_H -> PRS2LOCK_H
10.27. rfmt.c -> remove (as irrelevant)
10.28. rmbuf -> buf
10.29. RunningXacts -> RunningTransactionsData (and remove a nearby
comment) (orphaned since 8431e296)
10.30. rvsToCluster -> RelToCluster
10.31. s1_delete -> remove (not used since the introduction in 8b21b416)
10.32. s1_reindex, s1_vacuum, s3_vacuum -> remove (not used since the
introduction in 9c2f0a6c)
10.33. s1reset -> s1restart
10.34. s1setval -> remove (not used since the introduction in 3d79013b)
10.35. s2_alter_tbl1_text, s2_alter_tbl1_add_int,
s2_alter_tbl1_add_float, s2_alter_tbl1_add_char,
s2_alter_tbl1_add_boolean, s2_alter_tbl1_add_text, 
s2_alter_tbl2_add_boolean -> remove (not used since the introduction in
b89e1510)
10.36. saop_leftop -> leftop
10.37. ScalarArrayOps -> ScalarArrayOpExprs
10.38. seekPos -> remove (orphaned since c24dcd0c)
10.39. segv -> SIGSEGV
10.40. semphores -> semaphores
10.41. sepgsql_audit_hook -> remove (and remove a comment) (not present
since the introduction in 968bc6fa)
10.42. seqNo -> commitSeqNo
10.43. seqtable -> seqhashtab
10.44. serendipitiously -> serendipitously
10.45. serializefn, deserializefn -> serialfn, deserialfn
10.46. setstmt -> altersysstmt
10.47. serv, servlen, host, hostlen -> service, servicelen, node, nodelen
10.48. server_version_int -> server_version_num
10.49. session_timestamp -> session_timezone
10.50. sigsetmask -> pgsigsetmask
10.51. SimpleLRU -> SimpleLru
10.52. SIXBIT -> PGSIXBIT
10.53. SizeOfHashCreateIdx, xl_hash_createidx -> remove (not used since
the introduction in c11453ce)
10.54. SizeOfXlogRecord -> SizeOfXLogRecord
10.55. sk_flag -> sk_flags
10.56. SLAB_CHUNKHDRSZ -> sizeof(SlabChunk) (orphaned after 7e3aa03b)
10.57. SlotAcquire -> ReplicationSlotAcquire
10.58. SM_DATABASE_USER -> remove (with a wrong nearby comment)
(orphaned since cb7fb3ca)
10.59. smgrscheduleunlink -> RelationDropStorage (orphaned since 33960006)
10.60. SnapBuildProcessRecord -> SnapBuildProcessRunningXacts
10.61. snapshotname -> snapshot_id
10.62. snap_state -> fctx
10.63. SO_EXLUSIVEADDRUSE -> SO_EXCLUSIVEADDRUSE
10.64. sortTuple -> SortTuple
10.65. sourcexid -> sourcevxid
10.66. spcpath -> spclocation
10.67. SPI_plan -> _SPI_plan
10.68. SPI_stack -> _SPI_stack
10.69. splited -> splitted
10.70. sqlcabc -> sqlabc
10.71. standbydef.h -> standbydefs.h
10.72. _StaticAssert -> _Static_assert
10.73. StdRdOption -> StdRdOptions
10.74. StringSortSupport -> VarStringSortSupport
10.75. STrNCpy -> StrNCpy
10.76. stxid -> relid
10.77. subtransactiony -> subtransaction
10.78. subtransations -> subtransactions
10.79. SubtransSetParent -> SubTransSetParent
10.80. succeeeded -> succeeded
10.81. SUE -> ShareUpdateExclusive
10.82. SYMENC_MDC -> SYMENCRYPTED_DATA_MDC
10.83. SYMENCRYPTED_MDC -> SYMENCRYPTED_DATA_MDC
10.84. symkey -> sym_key
10.85. synchroniation -> synchronization
10.86. system_id -> system_identifier
10.87. sysdate -> now()
10.88. SYSTEM_RESEED_* -> remove (orphaned since fe0a0b59)
10.89. http://www.cs.auckland.ac.nz/software/AlgAnim/niemann/s_man.htm
-> https://www.epaperpress.com/sortsearch/
10.90. www.pgbuildfarm.org -> buildfarm.postgresql.org
10.91. oft -> of
10.92. It the username successfully retrieved (fix_for_fix_8.15)

Best regards,
Alexander

diff --git a/contrib/ltree/ltxtquery_io.c b/contrib/ltree/ltxtquery_io.c
index b576676746..054c5d9335 100644
--- a/contrib/ltree/ltxtquery_io.c
+++ b/contrib/ltree/ltxtquery_io.c
@@ -166,7 +166,7 @@ pushquery(QPRS_STATE *state, int32 type, int32 val, int32 distance, int32 lenval
 }
 
 /*
- * This function is used for query_txt parsing
+ * This function is used for query text parsing
  */
 static void
 pushval_asis(QPRS_STATE *state, int type, char *strval, int lenval, uint16 flag)
diff --git a/contrib/pgcrypto/pgp.h b/contrib/pgcrypto/pgp.h
index 7c97fa398f..f338523b7a 100644
--- a/contrib/pgcrypto/pgp.h
+++ b/contrib/pgcrypto/pgp.h
@@ -279,7 +279,7 @@ int			pgp_s2k_process(PGP_S2K *s2k, int cipher, const uint8 *key, int klen);
 
 typedef struct PGP_CFB PGP_CFB;
 int			pgp_cfb_create(PGP_CFB **ctx_p, int algo,
-						   const uint8 *key, int key_len, int recync, uint8 *iv);
+						   const uint8 *key, int key_len, int resync, uint8 *iv);
 void		pgp_cfb_free(PGP_CFB *ctx);
 int			pgp_cfb_encrypt(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst);
 int			pgp_cfb_decrypt(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst);
diff --git a/contrib/sepgsql/label.c b/contrib/sepgsql/label.c
index 2b6a415093..63a2dd5cc1 100644
--- a/contrib/sepgsql/label.c
+++ b/contrib/sepgsql/label.c
@@ -653,7 +653,7 @@ sepgsql_mcstrans_out(PG_FUNCTION_ARGS)
 }
 
 /*
- * quote_object_names
+ * quote_object_name
  *
  * It tries to quote the supplied identifiers
  */
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index ef1556be8f..7c30b4e28c 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -3740,9 +3740,9 @@ RAISE unique_violation USING MESSAGE = 'Duplicate user ID: ' || user_id;
    <para>
     If no condition name nor SQLSTATE is specified in a
     <command>RAISE EXCEPTION</command> command, the default is to use
-    <literal>RAISE_EXCEPTION</literal> (<literal>P0001</literal>).  If no message
-    text is specified, the default is to use the condition name or
-    SQLSTATE as message text.
+    <literal>ERRCODE_RAISE_EXCEPTION</literal> (<literal>P0001</literal>).
+    If no message text is specified, the default is to use the condition
+    name or SQLSTATE as message text.
    </para>
 
    <note>
diff --git a/src/backend/partitioning/partbounds.c b/src/backend/partitioning/partbounds.c
index 5a29b9673b..46d03f3b9b 100644
--- a/src/backend/partitioning/partbounds.c
+++ b/src/backend/partitioning/partbounds.c
@@ -1514,7 +1514,7 @@ partition_rbound_cmp(int partnatts, FmgrInfo *partsupfunc,
 /*
  * partition_rbound_datum_cmp
  *
- * Return whether range bound (specified in rb_datums, rb_kind, and rb_lower)
+ * Return whether range bound (specified in rb_datums and rb_kind)
  * is <, =, or > partition key of tuple (tuple_datums)
  *
  * n_tuple_datums, partsupfunc and partcollation give number of attributes in
diff --git a/src/backend/utils/adt/rangetypes_typanalyze.c b/src/backend/utils/adt/rangetypes_typanalyze.c
index 631e421062..d01d3032cc 100644
--- a/src/backend/utils/adt/rangetypes_typanalyze.c
+++ b/src/backend/utils/adt/rangetypes_typanalyze.c
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * ragetypes_typanalyze.c
+ * rangetypes_typanalyze.c
  *	  Functions for gathering statistics from range columns
  *
  * For a range type column, histograms of lower and upper bounds, and
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 0f40328310..6c739ce663 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -1989,7 +1989,7 @@ WriteInt(ArchiveHandle *AH, int i)
 	 * This is a bit yucky, but I don't want to make the binary format very
 	 * dependent on representation, and not knowing much about it, I write out
 	 * a sign byte. If you change this, don't forget to change the file
-	 * version #, and modify readInt to read the new format AS WELL AS the old
+	 * version #, and modify ReadInt to read the new format AS WELL AS the old
 	 * formats.
 	 */
 
diff --git a/src/include/access/xlogreader.h b/src/include/access/xlogreader.h
index a12c94cba6..aa9bc63725 100644
--- a/src/include/access/xlogreader.h
+++ b/src/include/access/xlogreader.h
@@ -248,7 +248,7 @@ extern bool DecodeXLogRecord(XLogReaderState *state, XLogRecord *record,
 extern FullTransactionId XLogRecGetFullXid(XLogReaderState *record);
 #endif
 
-extern bool RestoreBlockImage(XLogReaderState *recoder, uint8 block_id, char *dst);
+extern bool RestoreBlockImage(XLogReaderState *record, uint8 block_id, char *page);
 extern char *XLogRecGetBlockData(XLogReaderState *record, uint8 block_id, Size *len);
 extern bool XLogRecGetBlockTag(XLogReaderState *record, uint8 block_id,
 							   RelFileNode *rnode, ForkNumber *forknum,
diff --git a/src/include/port/win32_port.h b/src/include/port/win32_port.h
index f4841fb397..1cf166a570 100644
--- a/src/include/port/win32_port.h
+++ b/src/include/port/win32_port.h
@@ -451,7 +451,7 @@ int			pgwin32_bind(SOCKET s, struct sockaddr *addr, int addrlen);
 int			pgwin32_listen(SOCKET s, int backlog);
 SOCKET		pgwin32_accept(SOCKET s, struct sockaddr *addr, int *addrlen);
 int			pgwin32_connect(SOCKET s, const struct sockaddr *name, int namelen);
-int			pgwin32_select(int nfds, fd_set *readfs, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout);
+int			pgwin32_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout);
 int			pgwin32_recv(SOCKET s, char *buf, int len, int flags);
 int			pgwin32_send(SOCKET s, const void *buf, int len, int flags);
 int			pgwin32_waitforsinglesocket(SOCKET s, int what, int timeout);
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index b0fe19ebc5..2174bbafd1 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -75,7 +75,7 @@ typedef struct RelationData
 	 * when a relation has multiple new relfilenodes within a single
 	 * transaction, with one of them occurring in a subsequently aborted
 	 * subtransaction, e.g. BEGIN; TRUNCATE t; SAVEPOINT save; TRUNCATE t;
-	 * ROLLBACK TO save; -- rd_newRelfilenode is now forgotten
+	 * ROLLBACK TO save; -- rd_newRelfilenodeSubid is now forgotten
 	 */
 	SubTransactionId rd_createSubid;	/* rel was created in current xact */
 	SubTransactionId rd_newRelfilenodeSubid;	/* new relfilenode assigned in
diff --git a/contrib/spi/refint.example b/contrib/spi/refint.example
index d0ff744164..299166d504 100644
--- a/contrib/spi/refint.example
+++ b/contrib/spi/refint.example
@@ -5,7 +5,7 @@ CREATE TABLE A (
 );
 CREATE UNIQUE INDEX AI ON A (ID);
 
---Columns REFB of table B and REFC of C are foreign keys referenting ID of A:
+--Columns REFB of table B and REFC of C are foreign keys referencing ID of A:
 
 CREATE TABLE B (
 	REFB	int4
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index e9ca4b8252..745be4581b 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -37,7 +37,7 @@ static bool gistinserttuples(GISTInsertState *state, GISTInsertStack *stack,
 							 Buffer leftchild, Buffer rightchild,
 							 bool unlockbuf, bool unlockleftchild);
 static void gistfinishsplit(GISTInsertState *state, GISTInsertStack *stack,
-							GISTSTATE *giststate, List *splitinfo, bool releasebuf);
+							GISTSTATE *giststate, List *splitinfo, bool unlockbuf);
 static void gistprunepage(Relation rel, Page page, Buffer buffer,
 						  Relation heapRel);
 
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index a065419cdb..1af31c2b9f 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -317,13 +317,6 @@ IsSharedRelation(Oid relationId)
  * consecutive existing OIDs.  This is a mostly reasonable assumption for
  * system catalogs.
  *
- * This is exported separately because there are cases where we want to use
- * an index that will not be recognized by RelationGetOidIndex: TOAST tables
- * have indexes that are usable, but have multiple columns and are on
- * ordinary columns rather than a true OID column.  This code will work
- * anyway, so long as the OID is the index's first column.  The caller must
- * pass in the actual heap attnum of the OID column, however.
- *
  * Caller must have a suitable lock on the relation.
  */
 Oid
diff --git a/src/backend/catalog/pg_constraint.c b/src/backend/catalog/pg_constraint.c
index b6145593a3..56568b0105 100644
--- a/src/backend/catalog/pg_constraint.c
+++ b/src/backend/catalog/pg_constraint.c
@@ -580,7 +580,7 @@ RemoveConstraintById(Oid conId)
 		rel = table_open(con->conrelid, AccessExclusiveLock);
 
 		/*
-		 * We need to update the relcheck count if it is a check constraint
+		 * We need to update the relchecks count if it is a check constraint
 		 * being dropped.  This update will force backends to rebuild relcache
 		 * entries when we commit.
 		 */
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 3a9a994733..11446a1056 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -1811,7 +1811,7 @@ append_nonpartial_cost(List *subpaths, int numpaths, int parallel_workers)
 		return 0;
 
 	/*
-	 * Array length is number of workers or number of relevants paths,
+	 * Array length is number of workers or number of relevant paths,
 	 * whichever is less.
 	 */
 	arrlen = Min(parallel_workers, numpaths);
diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c
index 11bbe2c397..61544f65ad 100644
--- a/src/backend/postmaster/checkpointer.c
+++ b/src/backend/postmaster/checkpointer.c
@@ -750,7 +750,7 @@ IsCheckpointOnSchedule(double progress)
 	 * We compare the current WAL insert location against the location
 	 * computed before calling CreateCheckPoint. The code in XLogInsert that
 	 * actually triggers a checkpoint when CheckPointSegments is exceeded
-	 * compares against RedoRecptr, so this is not completely accurate.
+	 * compares against RedoRecPtr, so this is not completely accurate.
 	 * However, it's good enough for our purposes, we're only calculating an
 	 * estimate anyway.
 	 *
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c
index c77d47c01c..85748dd05e 100644
--- a/src/backend/storage/lmgr/lwlock.c
+++ b/src/backend/storage/lmgr/lwlock.c
@@ -1075,7 +1075,7 @@ LWLockDequeueSelf(LWLock *lock)
 		 */
 
 		/*
-		 * Reset releaseOk if somebody woke us before we removed ourselves -
+		 * Reset RELEASE_OK flag if somebody woke us before we removed ourselves -
 		 * they'll have set it to false.
 		 */
 		pg_atomic_fetch_or_u32(&lock->state, LW_FLAG_RELEASE_OK);
diff --git a/src/include/regex/regex.h b/src/include/regex/regex.h
index dc31899aa4..0caf16982c 100644
--- a/src/include/regex/regex.h
+++ b/src/include/regex/regex.h
@@ -109,7 +109,6 @@ typedef struct
 #define REG_NLSTOP	000100		/* \n doesn't match . or [^ ] */
 #define REG_NLANCH	000200		/* ^ matches after \n, $ before */
 #define REG_NEWLINE 000300		/* newlines are line terminators */
-#define REG_PEND	000400		/* ugh -- backward-compatibility hack */
 #define REG_EXPECT	001000		/* report details on partial/limited matches */
 #define REG_BOSONLY 002000		/* temporary kludge for BOS-only matches */
 #define REG_DUMP	004000		/* none of your business :-) */
@@ -123,7 +122,6 @@ typedef struct
  */
 #define REG_NOTBOL	0001		/* BOS is not BOL */
 #define REG_NOTEOL	0002		/* EOS is not EOL */
-#define REG_STARTEND	0004	/* backward compatibility kludge */
 #define REG_FTRACE	0010		/* none of your business */
 #define REG_MTRACE	0020		/* none of your business */
 #define REG_SMALL	0040		/* none of your business */
diff --git a/src/test/regress/.gitignore b/src/test/regress/.gitignore
index 173f995d24..89129d7358 100644
--- a/src/test/regress/.gitignore
+++ b/src/test/regress/.gitignore
@@ -6,6 +6,6 @@
 /results/
 /log/
 
-# Note: regreesion.* are only left behind on a failure; that's why they're not ignored
+# Note: regression.* are only left behind on a failure; that's why they're not ignored
 #/regression.diffs
 #/regression.out
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index cedb4ee844..28985a07ec 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -1522,7 +1522,7 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
 
 /*
  * Get a list of tables that the current user owns and
- * have indisclustered set.  Return the list in a List * of rvsToCluster
+ * have indisclustered set.  Return the list in a List * of RelToCluster
  * with the tableOid and the indexOid on which the table is already
  * clustered.
  */
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index 62342a69cb..16fcd9df31 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -108,7 +108,7 @@ static void CreateSlotOnDisk(ReplicationSlot *slot);
 static void SaveSlotToPath(ReplicationSlot *slot, const char *path, int elevel);
 
 /*
- * Report shared-memory space needed by ReplicationSlotShmemInit.
+ * Report shared-memory space needed by ReplicationSlotsShmemInit.
  */
 Size
 ReplicationSlotsShmemSize(void)
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 469aac38c4..5fabccc72a 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -734,8 +734,6 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running)
 	Assert(standbyState == STANDBY_INITIALIZED);
 
 	/*
-	 * OK, we need to initialise from the RunningTransactionsData record.
-	 *
 	 * NB: this can be reached at least twice, so make sure new code can deal
 	 * with that.
 	 */
@@ -753,8 +751,8 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running)
 	 * We don't call SubtransSetParent because it doesn't matter yet. If we
 	 * aren't overflowed then all xids will fit in snapshot and so we don't
 	 * need subtrans. If we later overflow, an xid assignment record will add
-	 * xids to subtrans. If RunningXacts is overflowed then we don't have
-	 * enough information to correctly update subtrans anyway.
+	 * xids to subtrans. If RunningTransactionsData is overflowed then we
+	 * don't have enough information to correctly update subtrans anyway.
 	 */
 
 	/*
diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c
index 5e629d29ea..0280c2625c 100644
--- a/src/backend/utils/adt/xml.c
+++ b/src/backend/utils/adt/xml.c
@@ -3987,7 +3987,7 @@ xml_xpathobjtoxmlarray(xmlXPathObjectPtr xpathobj,
 /*
  * Common code for xpath() and xmlexists()
  *
- * Evaluate XPath expression and return number of nodes in res_items
+ * Evaluate XPath expression and return number of nodes in res_nitems
  * and array of XML values in astate.  Either of those pointers can be
  * NULL if the corresponding result isn't wanted.
  *
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 57c4ed6913..b3bbb903fc 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -138,7 +138,7 @@ typedef struct
 	char	   *nspname;		/* namespace name */
 	char	   *relname;		/* relation name */
 	Oid			reloid;			/* relation OID */
-	Oid			relfilenode;	/* relation relfile node */
+	Oid			relfilenode;	/* relation file node */
 	Oid			indtable;		/* if index, OID of its table, else 0 */
 	Oid			toastheap;		/* if toast table, OID of base table, else 0 */
 	char	   *tablespace;		/* tablespace path; "" for cluster default */
diff --git a/src/include/access/brin_revmap.h b/src/include/access/brin_revmap.h
index 2ade88bc1e..4351dcca1f 100644
--- a/src/include/access/brin_revmap.h
+++ b/src/include/access/brin_revmap.h
@@ -31,7 +31,7 @@ extern void brinRevmapExtend(BrinRevmap *revmap,
 							 BlockNumber heapBlk);
 extern Buffer brinLockRevmapPageForUpdate(BrinRevmap *revmap,
 										  BlockNumber heapBlk);
-extern void brinSetHeapBlockItemptr(Buffer rmbuf, BlockNumber pagesPerRange,
+extern void brinSetHeapBlockItemptr(Buffer buf, BlockNumber pagesPerRange,
 									BlockNumber heapBlk, ItemPointerData tid);
 extern BrinTuple *brinGetTupleForHeapBlock(BrinRevmap *revmap,
 										   BlockNumber heapBlk, Buffer *buf, OffsetNumber *off,
diff --git a/src/include/postgres.h b/src/include/postgres.h
index 057a3413ac..cb00ac4a06 100644
--- a/src/include/postgres.h
+++ b/src/include/postgres.h
@@ -69,7 +69,7 @@ typedef struct varatt_external
 	int32		va_rawsize;		/* Original data size (includes header) */
 	int32		va_extsize;		/* External saved size (doesn't) */
 	Oid			va_valueid;		/* Unique ID of value within TOAST table */
-	Oid			va_toastrelid;	/* RelID of TOAST table containing it */
+	Oid			va_toastrelid;	/* Relation ID of TOAST table containing it */
 }			varatt_external;
 
 /*
diff --git a/src/include/rewrite/prs2lock.h b/src/include/rewrite/prs2lock.h
index 62e756ff63..07ca649359 100644
--- a/src/include/rewrite/prs2lock.h
+++ b/src/include/rewrite/prs2lock.h
@@ -43,4 +43,4 @@ typedef struct RuleLock
 	RewriteRule **rules;
 } RuleLock;
 
-#endif							/* REWRITE_H */
+#endif							/* PRS2LOCK_H */
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
index 8fc0a467f7..d15a535f89 100644
--- a/src/interfaces/ecpg/compatlib/informix.c
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -679,11 +679,6 @@ intoasc(interval * i, char *str)
 	return 0;
 }
 
-/*
- *	rfmt.c	-  description
- *	by Carsten Wolff <carsten.wo...@credativ.de>, Wed Apr 2 2003
- */
-
 static struct
 {
 	long		val;
diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h
index 3151975564..22c4954f2b 100644
--- a/src/interfaces/libpq/libpq-fe.h
+++ b/src/interfaces/libpq/libpq-fe.h
@@ -287,7 +287,7 @@ extern PQconninfoOption *PQconninfo(PGconn *conn);
 extern void PQconninfoFree(PQconninfoOption *connOptions);
 
 /*
- * close the current connection and restablish a new one with the same
+ * close the current connection and reestablish a new one with the same
  * parameters
  */
 /* Asynchronous (non-blocking) */
diff --git a/contrib/fuzzystrmatch/dmetaphone.c b/contrib/fuzzystrmatch/dmetaphone.c
index bff20b37e6..f2f16bc883 100644
--- a/contrib/fuzzystrmatch/dmetaphone.c
+++ b/contrib/fuzzystrmatch/dmetaphone.c
@@ -191,7 +191,7 @@ dmetaphone_alt(PG_FUNCTION_ARGS)
 					  (v = (t*)repalloc((v),((n)*sizeof(t))))
 
 /*
- * Don't do pfree - it seems to cause a segv sometimes - which might have just
+ * Don't do pfree - it seems to cause a SIGSEGV sometimes - which might have just
  * been caused by reloading the module in development.
  * So we rely on context cleanup - Tom Lane says pfree shouldn't be necessary
  * in a case like this.
diff --git a/contrib/test_decoding/specs/concurrent_ddl_dml.spec b/contrib/test_decoding/specs/concurrent_ddl_dml.spec
index e7cea37d30..6ee3f085d8 100644
--- a/contrib/test_decoding/specs/concurrent_ddl_dml.spec
+++ b/contrib/test_decoding/specs/concurrent_ddl_dml.spec
@@ -29,15 +29,8 @@ setup { SET synchronous_commit=on; }
 
 step "s2_alter_tbl1_float" { ALTER TABLE tbl1 ALTER COLUMN val2 TYPE float; }
 step "s2_alter_tbl1_char" { ALTER TABLE tbl1 ALTER COLUMN val2 TYPE character varying; }
-step "s2_alter_tbl1_text" { ALTER TABLE tbl1 ALTER COLUMN val2 TYPE text; }
 step "s2_alter_tbl1_boolean" { ALTER TABLE tbl1 ALTER COLUMN val2 TYPE boolean; }
 
-step "s2_alter_tbl1_add_int" { ALTER TABLE tbl1 ADD COLUMN val3 INTEGER; }
-step "s2_alter_tbl1_add_float" { ALTER TABLE tbl1 ADD COLUMN val3 FLOAT; }
-step "s2_alter_tbl1_add_char" { ALTER TABLE tbl1 ADD COLUMN val3 character varying; }
-step "s2_alter_tbl1_add_boolean" { ALTER TABLE tbl1 ADD COLUMN val3 BOOLEAN; }
-step "s2_alter_tbl1_add_text" { ALTER TABLE tbl1 ADD COLUMN val3 TEXT; }
-
 step "s2_alter_tbl2_float" { ALTER TABLE tbl2 ALTER COLUMN val2 TYPE float; }
 step "s2_alter_tbl2_char" { ALTER TABLE tbl2 ALTER COLUMN val2 TYPE character varying; }
 step "s2_alter_tbl2_text" { ALTER TABLE tbl2 ALTER COLUMN val2 TYPE text; }
@@ -46,7 +39,6 @@ step "s2_alter_tbl2_boolean" { ALTER TABLE tbl2 ALTER COLUMN val2 TYPE boolean;
 step "s2_alter_tbl2_add_int" { ALTER TABLE tbl2 ADD COLUMN val3 INTEGER; }
 step "s2_alter_tbl2_add_float" { ALTER TABLE tbl2 ADD COLUMN val3 FLOAT; }
 step "s2_alter_tbl2_add_char" { ALTER TABLE tbl2 ADD COLUMN val3 character varying; }
-step "s2_alter_tbl2_add_boolean" { ALTER TABLE tbl2 ADD COLUMN val3 BOOLEAN; }
 step "s2_alter_tbl2_add_text" { ALTER TABLE tbl2 ADD COLUMN val3 TEXT; }
 step "s2_alter_tbl2_drop_3rd_col" { ALTER TABLE tbl2 DROP COLUMN val3; }
 step "s2_alter_tbl2_3rd_char" { ALTER TABLE tbl2 ALTER COLUMN val3 TYPE character varying; }
diff --git a/src/backend/partitioning/partprune.c b/src/backend/partitioning/partprune.c
index 2ee47b8c8a..d8b6638753 100644
--- a/src/backend/partitioning/partprune.c
+++ b/src/backend/partitioning/partprune.c
@@ -2127,7 +2127,7 @@ match_clause_to_partition_key(GeneratePruningStepsContext *context,
 
 		/*
 		 * Now generate a list of clauses, one for each array element, of the
-		 * form saop_leftop saop_op elem_expr
+		 * form leftop saop_op elem_expr
 		 */
 		elem_clauses = NIL;
 		foreach(lc1, elem_exprs)
diff --git a/src/backend/port/posix_sema.c b/src/backend/port/posix_sema.c
index 5e77cb0c12..3370adf35e 100644
--- a/src/backend/port/posix_sema.c
+++ b/src/backend/port/posix_sema.c
@@ -189,7 +189,7 @@ PGSemaphoreShmemSize(int maxSemas)
  * maxSemas parameter is just used to size the arrays.  For unnamed
  * semaphores, there is an array of PGSemaphoreData structs in shared memory.
  * For named semaphores, we keep a postmaster-local array of sem_t pointers,
- * which we use for releasing the semphores when done.
+ * which we use for releasing the semaphores when done.
  * (This design minimizes the dependency of postmaster shutdown on the
  * contents of shared memory, which a failed backend might have clobbered.
  * We can't do much about the possibility of sem_destroy() crashing, but
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 60f39031fb..a76112d6cd 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -1971,10 +1971,6 @@ retry:
 	{
 		/*
 		 * Maintain fileSize and temporary_files_size if it's a temp file.
-		 *
-		 * If seekPos is -1 (unknown), this will do nothing; but we could only
-		 * get here in that state if we're not enforcing temporary_files_size,
-		 * so we don't care.
 		 */
 		if (vfdP->fdstate & FD_TEMP_FILE_LIMIT)
 		{
diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h
index 85d9ecbfc6..9554952a8a 100644
--- a/src/include/utils/selfuncs.h
+++ b/src/include/utils/selfuncs.h
@@ -109,7 +109,7 @@ typedef struct
 	double		numIndexPages;	/* number of leaf pages visited */
 	double		numIndexTuples; /* number of leaf tuples visited */
 	double		spc_random_page_cost;	/* relevant random_page_cost value */
-	double		num_sa_scans;	/* # indexscans from ScalarArrayOps */
+	double		num_sa_scans;	/* # indexscans from ScalarArrayOpExprs */
 } GenericCosts;
 
 /* Hooks for plugins to get control when we ask for stats */
diff --git a/src/test/isolation/specs/freeze-the-dead.spec b/src/test/isolation/specs/freeze-the-dead.spec
index e24d7d5d11..219242841d 100644
--- a/src/test/isolation/specs/freeze-the-dead.spec
+++ b/src/test/isolation/specs/freeze-the-dead.spec
@@ -19,7 +19,6 @@ session "s1"
 step "s1_begin"		{ BEGIN; }
 step "s1_update"	{ UPDATE tab_freeze SET x = x + 1 WHERE id = 3; }
 step "s1_commit"	{ COMMIT; }
-step "s1_vacuum"	{ VACUUM FREEZE tab_freeze; }
 step "s1_selectone"	{
     BEGIN;
     SET LOCAL enable_seqscan = false;
@@ -28,7 +27,6 @@ step "s1_selectone"	{
     COMMIT;
 }
 step "s1_selectall"	{ SELECT * FROM tab_freeze ORDER BY name, id; }
-step "s1_reindex"	{ REINDEX TABLE tab_freeze; }
 
 session "s2"
 step "s2_begin"		{ BEGIN; }
@@ -40,7 +38,6 @@ session "s3"
 step "s3_begin"		{ BEGIN; }
 step "s3_key_share"	{ SELECT id FROM tab_freeze WHERE id = 3 FOR KEY SHARE; }
 step "s3_commit"	{ COMMIT; }
-step "s3_vacuum"	{ VACUUM FREEZE tab_freeze; }
 
 # This permutation verfies that a previous bug
 #     https://postgr.es/m/e5711e62-8fdf-4dca-a888-c200bf6b5...@amazon.com
diff --git a/src/test/isolation/specs/sequence-ddl.spec b/src/test/isolation/specs/sequence-ddl.spec
index 5c51fcdae6..f2a3ff628b 100644
--- a/src/test/isolation/specs/sequence-ddl.spec
+++ b/src/test/isolation/specs/sequence-ddl.spec
@@ -15,7 +15,6 @@ setup           { BEGIN; }
 step "s1alter"  { ALTER SEQUENCE seq1 MAXVALUE 10; }
 step "s1alter2" { ALTER SEQUENCE seq1 MAXVALUE 20; }
 step "s1restart" { ALTER SEQUENCE seq1 RESTART WITH 5; }
-step "s1setval" { SELECT setval('seq1', 5); }
 step "s1commit" { COMMIT; }
 
 session "s2"
@@ -29,7 +28,7 @@ permutation "s1alter" "s1commit" "s2nv"
 # change, but now it waits.
 permutation "s1alter" "s2nv" "s1commit"
 
-# Prior to PG10, the s2nv step would see the uncommitted s1reset
+# Prior to PG10, the s2nv step would see the uncommitted s1restart
 # change, but now it waits.
 permutation "s1restart" "s2nv" "s1commit"
 
diff --git a/src/test/isolation/specs/tuplelock-upgrade-no-deadlock.spec b/src/test/isolation/specs/tuplelock-upgrade-no-deadlock.spec
index 73f71b17a7..c3b688e19f 100644
--- a/src/test/isolation/specs/tuplelock-upgrade-no-deadlock.spec
+++ b/src/test/isolation/specs/tuplelock-upgrade-no-deadlock.spec
@@ -28,7 +28,6 @@ step "s1_keyshare" { select id from tlu_job where id = 1 for key share;}
 step "s1_share" { select id from tlu_job where id = 1 for share; }
 step "s1_fornokeyupd" { select id from tlu_job where id = 1 for no key update; }
 step "s1_update" { update tlu_job set name = 'b' where id = 1;  }
-step "s1_delete" { delete from tlu_job where id = 1; }
 step "s1_savept_e" { savepoint s1_e; }
 step "s1_savept_f" { savepoint s1_f; }
 step "s1_rollback_e" { rollback to s1_e; }
diff --git a/contrib/sepgsql/selinux.c b/contrib/sepgsql/selinux.c
index bc2be8427a..93a447e5ae 100644
--- a/contrib/sepgsql/selinux.c
+++ b/contrib/sepgsql/selinux.c
@@ -657,10 +657,8 @@ sepgsql_getenforce(void)
 /*
  * sepgsql_audit_log
  *
- * It generates a security audit record. In the default, it writes out
- * audit records into standard PG's logfile. It also allows to set up
- * external audit log receiver, such as auditd in Linux, using the
- * sepgsql_audit_hook.
+ * It generates a security audit record. It writes out
+ * audit records into standard PG's logfile.
  *
  * SELinux can control what should be audited and should not using
  * "auditdeny" and "auditallow" rules in the security policy. In the
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 6b42bdc77b..718f07f4f6 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -3029,7 +3029,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
 	 * the value ends up being the same, this test will fail and we will use
 	 * the stronger lock.  This is acceptable; the important case to optimize
 	 * is updates that don't manipulate key columns, not those that
-	 * serendipitiously arrive at the same key values.
+	 * serendipitously arrive at the same key values.
 	 */
 	if (!bms_overlap(modified_attrs, key_attrs))
 	{
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index 0960b339ca..a13322b693 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -1115,7 +1115,7 @@ init_sequence(Oid relid, SeqTable *p_elm, Relation *p_rel)
 	/*
 	 * Initialize the new hash table entry if it did not exist already.
 	 *
-	 * NOTE: seqtable entries are stored for the life of a backend (unless
+	 * NOTE: seqhashtab entries are stored for the life of a backend (unless
 	 * explicitly discarded with DISCARD). If the sequence itself is deleted
 	 * then the entry becomes wasted memory, but it's small enough that this
 	 * should not matter.
diff --git a/src/backend/port/win32/signal.c b/src/backend/port/win32/signal.c
index 7d8961f4a4..fd60375808 100644
--- a/src/backend/port/win32/signal.c
+++ b/src/backend/port/win32/signal.c
@@ -102,7 +102,7 @@ pgwin32_signal_initialize(void)
 /*
  * Dispatch all signals currently queued and not blocked
  * Blocked signals are ignored, and will be fired at the time of
- * the sigsetmask() call.
+ * the pgsigsetmask() call.
  */
 void
 pgwin32_dispatch_queued_signals(void)
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 85a629f4fc..6968750289 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -849,7 +849,7 @@ OldSerXidInit(void)
 /*
  * Record a committed read write serializable xid and the minimum
  * commitSeqNo of any transactions to which this xid had a rw-conflict out.
- * An invalid seqNo means that there were no conflicts out from xid.
+ * An invalid commitSeqNo means that there were no conflicts out from xid.
  */
 static void
 OldSerXidAdd(TransactionId xid, SerCommitSeqNo minConflictCommitSeqNo)
diff --git a/src/backend/utils/misc/check_guc b/src/backend/utils/misc/check_guc
index d228bbed68..416a0875b6 100755
--- a/src/backend/utils/misc/check_guc
+++ b/src/backend/utils/misc/check_guc
@@ -18,7 +18,7 @@
 ## can be ignored
 INTENTIONALLY_NOT_INCLUDED="debug_deadlocks \
 is_superuser lc_collate lc_ctype lc_messages lc_monetary lc_numeric lc_time \
-pre_auth_delay role seed server_encoding server_version server_version_int \
+pre_auth_delay role seed server_encoding server_version server_version_num \
 session_authorization trace_lock_oidmin trace_lock_table trace_locks trace_lwlocks \
 trace_notify trace_userlocks transaction_isolation transaction_read_only \
 zero_damaged_pages"
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index 4e2fb39105..3cbb08df92 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -768,8 +768,8 @@ typedef enum AggStrategy
 /* Primitive options supported by nodeAgg.c: */
 #define AGGSPLITOP_COMBINE		0x01	/* substitute combinefn for transfn */
 #define AGGSPLITOP_SKIPFINAL	0x02	/* skip finalfn, return state as-is */
-#define AGGSPLITOP_SERIALIZE	0x04	/* apply serializefn to output */
-#define AGGSPLITOP_DESERIALIZE	0x08	/* apply deserializefn to input */
+#define AGGSPLITOP_SERIALIZE	0x04	/* apply serialfn to output */
+#define AGGSPLITOP_DESERIALIZE	0x08	/* apply deserialfn to input */
 
 /* Supported operating modes (i.e., useful combinations of these options): */
 typedef enum AggSplit
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h
index a93ed77c9c..6791e0cbc2 100644
--- a/src/include/utils/guc.h
+++ b/src/include/utils/guc.h
@@ -365,7 +365,7 @@ extern int	set_config_option(const char *name, const char *value,
 							  GucContext context, GucSource source,
 							  GucAction action, bool changeVal, int elevel,
 							  bool is_reload);
-extern void AlterSystemSetConfigFile(AlterSystemStmt *setstmt);
+extern void AlterSystemSetConfigFile(AlterSystemStmt *altersysstmt);
 extern char *GetConfigOptionByName(const char *name, const char **varname,
 								   bool missing_ok);
 extern void GetConfigOptionByNum(int varnum, const char **values, bool *noshow);
diff --git a/src/port/getaddrinfo.c b/src/port/getaddrinfo.c
index 7f53afbea2..536c5f686e 100644
--- a/src/port/getaddrinfo.c
+++ b/src/port/getaddrinfo.c
@@ -49,8 +49,8 @@ typedef void (__stdcall * freeaddrinfo_ptr_t) (struct addrinfo *ai);
 
 typedef int (__stdcall * getnameinfo_ptr_t) (const struct sockaddr *sa,
 											 int salen,
-											 char *host, int hostlen,
-											 char *serv, int servlen,
+											 char *node, int nodelen,
+											 char *service, int servicelen,
 											 int flags);
 
 /* static pointers to the native routines, so we only do the lookup once. */
diff --git a/src/timezone/pgtz.c b/src/timezone/pgtz.c
index 1d5bd90afb..4b3829b0b5 100644
--- a/src/timezone/pgtz.c
+++ b/src/timezone/pgtz.c
@@ -357,7 +357,7 @@ pg_tzset_offset(long gmtoffset)
  * is to ensure that log_timezone has a valid value before any logging GUC
  * variables could become set to values that require elog.c to provide
  * timestamps (e.g., log_line_prefix).  We may as well initialize
- * session_timestamp to something valid, too.
+ * session_timezone to something valid, too.
  */
 void
 pg_timezone_initialize(void)
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c
index 93fab264ae..9b172c1a19 100644
--- a/src/backend/access/nbtree/nbtutils.c
+++ b/src/backend/access/nbtree/nbtutils.c
@@ -664,7 +664,7 @@ _bt_restore_array_keys(IndexScanDesc scan)
  * scan->numberOfKeys is the number of input keys, so->numberOfKeys gets
  * the number of output keys (possibly less, never greater).
  *
- * The output keys are marked with additional sk_flag bits beyond the
+ * The output keys are marked with additional sk_flags bits beyond the
  * system-standard bits supplied by the caller.  The DESC and NULLS_FIRST
  * indoption bits for the relevant index attribute are copied into the flags.
  * Also, for a DESC column, we commute (flip) all the sk_strategy numbers
diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c
index 13aa8e1b95..0fbcb4e6fe 100644
--- a/src/backend/access/transam/slru.c
+++ b/src/backend/access/transam/slru.c
@@ -1364,7 +1364,7 @@ SlruScanDirCbDeleteAll(SlruCtl ctl, char *filename, int segpage, void *data)
 }
 
 /*
- * Scan the SimpleLRU directory and apply a callback to each file found in it.
+ * Scan the SimpleLru directory and apply a callback to each file found in it.
  *
  * If the callback returns true, the scan is stopped.  The last return value
  * from the callback is returned.
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 1bbaeeebf4..52e9643305 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -1232,7 +1232,7 @@ RecordTransactionCommit(void)
 	if (!markXidCommitted)
 	{
 		/*
-		 * We expect that every smgrscheduleunlink is followed by a catalog
+		 * We expect that every RelationDropStorage is followed by a catalog
 		 * update, and hence XID assignment, so we shouldn't get here with any
 		 * pending deletes.  Use a real test not just an Assert to check this,
 		 * since it's a bit fragile.
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index 0d6e968ee6..c6faf48d24 100644
--- a/src/backend/access/transam/xlogreader.c
+++ b/src/backend/access/transam/xlogreader.c
@@ -702,7 +702,7 @@ ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr,
  * We assume all of the record (that is, xl_tot_len bytes) has been read
  * into memory at *record.  Also, ValidXLogRecordHeader() has accepted the
  * record's header, which means in particular that xl_tot_len is at least
- * SizeOfXlogRecord.
+ * SizeOfXLogRecord.
  */
 static bool
 ValidXLogRecord(XLogReaderState *state, XLogRecord *record, XLogRecPtr recptr)
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index dc64b1e0c2..0bd1d0f954 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -269,7 +269,7 @@ static void SnapBuildSnapIncRefcount(Snapshot snap);
 
 static void SnapBuildDistributeNewCatalogSnapshot(SnapBuild *builder, XLogRecPtr lsn);
 
-/* xlog reading helper functions for SnapBuildProcessRecord */
+/* xlog reading helper functions for SnapBuildProcessRunningXacts */
 static bool SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *running);
 static void SnapBuildWaitSnapshot(xl_running_xacts *running, TransactionId cutoff);
 
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index 62342a69cb..dbbca8af6c 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -298,7 +298,7 @@ ReplicationSlotCreate(const char *name, bool db_specific,
 	 * We need to briefly prevent any other backend from iterating over the
 	 * slots while we flip the in_use flag. We also need to set the active
 	 * flag while holding the ControlLock as otherwise a concurrent
-	 * SlotAcquire() could acquire the slot as well.
+	 * ReplicationSlotAcquire() could acquire the slot as well.
 	 */
 	LWLockAcquire(ReplicationSlotControlLock, LW_EXCLUSIVE);
 
diff --git a/src/backend/utils/mmgr/slab.c b/src/backend/utils/mmgr/slab.c
index bd8d200982..700a91a2a3 100644
--- a/src/backend/utils/mmgr/slab.c
+++ b/src/backend/utils/mmgr/slab.c
@@ -182,7 +182,7 @@ static const MemoryContextMethods SlabMethods = {
  * chunkSize: allocation chunk size
  *
  * The chunkSize may not exceed:
- *		MAXALIGN_DOWN(SIZE_MAX) - MAXALIGN(sizeof(SlabBlock)) - SLAB_CHUNKHDRSZ
+ *		MAXALIGN_DOWN(SIZE_MAX) - MAXALIGN(sizeof(SlabBlock)) - sizeof(SlabChunk)
  */
 MemoryContext
 SlabContextCreate(MemoryContext parent,
diff --git a/src/include/access/hash_xlog.h b/src/include/access/hash_xlog.h
index 53b682c56e..7d52145a2a 100644
--- a/src/include/access/hash_xlog.h
+++ b/src/include/access/hash_xlog.h
@@ -51,19 +51,6 @@
 #define XLH_SPLIT_META_UPDATE_MASKS		(1<<0)
 #define XLH_SPLIT_META_UPDATE_SPLITPOINT		(1<<1)
 
-/*
- * This is what we need to know about a HASH index create.
- *
- * Backup block 0: metapage
- */
-typedef struct xl_hash_createidx
-{
-	double		num_tuples;
-	RegProcedure procid;
-	uint16		ffactor;
-}			xl_hash_createidx;
-#define SizeOfHashCreateIdx (offsetof(xl_hash_createidx, ffactor) + sizeof(uint16))
-
 /*
  * This is what we need to know about simple (without split) insert.
  *
diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h
index baf6a4b6c0..15cd7a160b 100644
--- a/src/include/libpq/pqcomm.h
+++ b/src/include/libpq/pqcomm.h
@@ -132,8 +132,6 @@ typedef uint32 PacketLen;
 
 #define SM_DATABASE		64
 #define SM_USER			32
-/* We append database name if db_user_namespace true. */
-#define SM_DATABASE_USER (SM_DATABASE+SM_USER+1)	/* +1 for @ */
 #define SM_OPTIONS		64
 #define SM_UNUSED		64
 #define SM_TTY			64
@@ -142,7 +140,6 @@ typedef struct StartupPacket
 {
 	ProtocolVersion protoVersion;	/* Protocol version */
 	char		database[SM_DATABASE];	/* Database name */
-	/* Db_user_namespace appends dbname */
 	char		user[SM_USER];	/* User name */
 	char		options[SM_OPTIONS];	/* Optional additional args */
 	char		unused[SM_UNUSED];	/* Unused */
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index dbfd8efd26..ba0b7f6f79 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -63,7 +63,7 @@
 	(PGSIXBIT(ch1) + (PGSIXBIT(ch2) << 6) + (PGSIXBIT(ch3) << 12) + \
 	 (PGSIXBIT(ch4) << 18) + (PGSIXBIT(ch5) << 24))
 
-/* These macros depend on the fact that '0' becomes a zero in SIXBIT */
+/* These macros depend on the fact that '0' becomes a zero in PGSIXBIT */
 #define ERRCODE_TO_CATEGORY(ec)  ((ec) & ((1 << 12) - 1))
 #define ERRCODE_IS_CATEGORY(ec)  (((ec) & ~((1 << 12) - 1)) == 0)
 
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index b6a4fa2600..a1ebcaa862 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -5011,7 +5011,7 @@ struct
 
    <para>
     The fields <structfield>sqlcaid</structfield>,
-    <structfield>sqlcabc</structfield>,
+    <structfield>sqlabc</structfield>,
     <structfield>sqlerrp</structfield>, and the remaining elements of
     <structfield>sqlerrd</structfield> and
     <structfield>sqlwarn</structfield> currently contain no useful
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 017713f6e4..77dd9a0d89 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -1018,7 +1018,7 @@ PostgreSQL documentation
      </varlistentry>
 
      <varlistentry>
-       <term><option>--snapshot=<replaceable class="parameter">snapshotname</replaceable></option></term>
+       <term><option>--snapshot=<replaceable class="parameter">snapshot_id</replaceable></option></term>
        <listitem>
          <para>
           Use the specified synchronized snapshot when making a dump of the
@@ -1032,7 +1032,7 @@ PostgreSQL documentation
           or with a concurrent session.
          </para>
          <para>
-          In the case of a parallel dump, the snapshot name defined by this
+          In the case of a parallel dump, the snapshot id defined by this
           option is used rather than taking a new snapshot.
          </para>
        </listitem>
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index e9ca4b8252..54eedf8f0c 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -1047,7 +1047,7 @@ gistFindCorrectParent(Relation r, GISTInsertStack *child)
 			{
 				/*
 				 * End of chain and still didn't find parent. It's a very-very
-				 * rare situation when root splited.
+				 * rare situation when root splitted.
 				 */
 				break;
 			}
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index b8eb83b2e0..e6ff929b5c 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -2603,8 +2603,8 @@ _SPI_cursor_operation(Portal portal, FetchDirection direction, long count,
 
 	/*
 	 * Think not to combine this store with the preceding function call. If
-	 * the portal contains calls to functions that use SPI, then SPI_stack is
-	 * likely to move around while the portal runs.  When control returns,
+	 * the portal contains calls to functions that use SPI, then _SPI_stack
+	 * is likely to move around while the portal runs.  When control returns,
 	 * _SPI_current will point to the correct stack entry... but the pointer
 	 * may be different than it was beforehand. So we must be sure to re-fetch
 	 * the pointer after the function call completes.
@@ -2733,7 +2733,7 @@ _SPI_make_plan_non_temp(SPIPlanPtr plan)
 									ALLOCSET_SMALL_SIZES);
 	oldcxt = MemoryContextSwitchTo(plancxt);
 
-	/* Copy the SPI_plan struct and subsidiary data into the new context */
+	/* Copy the _SPI_plan struct and subsidiary data into the new context */
 	newplan = (SPIPlanPtr) palloc0(sizeof(_SPI_plan));
 	newplan->magic = _SPI_PLAN_MAGIC;
 	newplan->plancxt = plancxt;
diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index d8d863dda2..050d84adc5 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -485,7 +485,7 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
 		 * error on TCP ports.
 		 *
 		 * On win32, however, this behavior only happens if the
-		 * SO_EXLUSIVEADDRUSE is set. With SO_REUSEADDR, win32 allows multiple
+		 * SO_EXCLUSIVEADDRUSE is set. With SO_REUSEADDR, win32 allows multiple
 		 * servers to listen on the same address, resulting in unpredictable
 		 * behavior. With no flags at all, win32 behaves as Unix with
 		 * SO_REUSEADDR.
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c
index d5f9b617c8..c91f66dcbe 100644
--- a/src/backend/replication/basebackup.c
+++ b/src/backend/replication/basebackup.c
@@ -792,7 +792,7 @@ SendBackupHeader(List *tablespaces)
 	pq_sendint32(&buf, 0);		/* typmod */
 	pq_sendint16(&buf, 0);		/* format code */
 
-	/* Second field - spcpath */
+	/* Second field - spclocation */
 	pq_sendstring(&buf, "spclocation");
 	pq_sendint32(&buf, 0);
 	pq_sendint16(&buf, 0);
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 85a629f4fc..a67b7ea4cb 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -1685,7 +1685,7 @@ SetSerializableTransactionSnapshot(Snapshot snapshot,
 /*
  * Guts of GetSerializableTransactionSnapshot
  *
- * If sourcexid is valid, this is actually an import operation and we should
+ * If sourcevxid is valid, this is actually an import operation and we should
  * skip calling GetSnapshotData, because the snapshot contents are already
  * loaded up.  HOWEVER: to avoid race conditions, we must check that the
  * source xact is still running after we acquire SerializableXactHashLock.
diff --git a/src/backend/utils/adt/txid.c b/src/backend/utils/adt/txid.c
index 4483db573f..90b2c9b694 100644
--- a/src/backend/utils/adt/txid.c
+++ b/src/backend/utils/adt/txid.c
@@ -705,7 +705,7 @@ txid_snapshot_xip(PG_FUNCTION_ARGS)
 	TxidSnapshot *snap;
 	txid		value;
 
-	/* on first call initialize snap_state and get copy of snapshot */
+	/* on first call initialize fctx and get copy of snapshot */
 	if (SRF_IS_FIRSTCALL())
 	{
 		TxidSnapshot *arg = (TxidSnapshot *) PG_GETARG_VARLENA_P(0);
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index bda802b447..d2bd2aee9f 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -1150,7 +1150,7 @@ tuplesort_begin_datum(Oid datumType, Oid sortOperator, Oid sortCollation,
 	 * to compare.  In a tuple sort, we could support that, because we can
 	 * always extract the original datum from the tuple as needed.  Here, we
 	 * can't, because a datum sort only stores a single copy of the datum; the
-	 * "tuple" field of each sortTuple is NULL.
+	 * "tuple" field of each SortTuple is NULL.
 	 */
 	state->sortKeys->abbreviate = !typbyval;
 
diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml
index a339ebbc4b..6294312ab7 100644
--- a/doc/src/sgml/sources.sgml
+++ b/doc/src/sgml/sources.sgml
@@ -884,7 +884,7 @@ BETTER: unrecognized node type: 42
      features can be used, if a fallback is provided.
     </para>
     <para>
-     For example <literal>_StaticAssert()</literal> and
+     For example <literal>_Static_assert()</literal> and
      <literal>__builtin_constant_p</literal> are currently used, even though
      they are from newer revisions of the C standard and a
      <productname>GCC</productname> extension respectively. If not available
diff --git a/src/backend/access/hash/hashpage.c b/src/backend/access/hash/hashpage.c
index defdc9b408..838ee68c86 100644
--- a/src/backend/access/hash/hashpage.c
+++ b/src/backend/access/hash/hashpage.c
@@ -1510,7 +1510,7 @@ _hash_getcachedmetap(Relation rel, Buffer *metabuf, bool force_refresh)
 		 * It's important that we don't set rd_amcache to an invalid value.
 		 * Either MemoryContextAlloc or _hash_getbuf could fail, so don't
 		 * install a pointer to the newly-allocated storage in the actual
-		 * relcache entry until both have succeeeded.
+		 * relcache entry until both have succeeded.
 		 */
 		if (rel->rd_amcache == NULL)
 			cache = MemoryContextAlloc(rel->rd_indexcxt,
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 5fabccc72a..8abcfdf841 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -748,7 +748,7 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running)
 	 * sort them first.
 	 *
 	 * Some of the new xids are top-level xids and some are subtransactions.
-	 * We don't call SubtransSetParent because it doesn't matter yet. If we
+	 * We don't call SubTransSetParent because it doesn't matter yet. If we
 	 * aren't overflowed then all xids will fit in snapshot and so we don't
 	 * need subtrans. If we later overflow, an xid assignment record will add
 	 * xids to subtrans. If RunningTransactionsData is overflowed then we
diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c
index 2376bda497..15fda7f122 100644
--- a/src/backend/utils/adt/pg_locale.c
+++ b/src/backend/utils/adt/pg_locale.c
@@ -79,7 +79,7 @@
 #undef StrNCpy
 #include <shlwapi.h>
 #ifdef StrNCpy
-#undef STrNCpy
+#undef StrNCpy
 #endif
 #endif
 
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 0864838867..9e34055801 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -2052,10 +2052,10 @@ varstr_sortsupport(SortSupport ssup, Oid typid, Oid collid)
 
 	/*
 	 * If we're using abbreviated keys, or if we're using a locale-aware
-	 * comparison, we need to initialize a StringSortSupport object.  Both
-	 * cases will make use of the temporary buffers we initialize here for
-	 * scratch space (and to detect requirement for BpChar semantics from
-	 * caller), and the abbreviation case requires additional state.
+	 * comparison, we need to initialize a VarStringSortSupport object.
+	 * Both cases will make use of the temporary buffers we initialize here
+	 * for scratch space (and to detect requirement for BpChar semantics
+	 * from caller), and the abbreviation case requires additional state.
 	 */
 	if (abbreviate || !collate_c)
 	{
diff --git a/src/include/access/reloptions.h b/src/include/access/reloptions.h
index a1912f41e6..6d392e4d5a 100644
--- a/src/include/access/reloptions.h
+++ b/src/include/access/reloptions.h
@@ -237,7 +237,7 @@ typedef struct
 
 /*
  * For use by code reading options already parsed: get a pointer to the string
- * value itself.  "optstruct" is the StdRdOption struct or equivalent, "member"
+ * value itself.  "optstruct" is the StdRdOptions struct or equivalent, "member"
  * is the struct member corresponding to the string option
  */
 #define GET_STRING_RELOPTION(optstruct, member) \
diff --git a/src/include/catalog/namespace.h b/src/include/catalog/namespace.h
index 187d76de18..edb98842fc 100644
--- a/src/include/catalog/namespace.h
+++ b/src/include/catalog/namespace.h
@@ -105,7 +105,7 @@ extern Oid	ConversionGetConid(const char *conname);
 extern bool ConversionIsVisible(Oid conid);
 
 extern Oid	get_statistics_object_oid(List *names, bool missing_ok);
-extern bool StatisticsObjIsVisible(Oid stxid);
+extern bool StatisticsObjIsVisible(Oid relid);
 
 extern Oid	get_ts_parser_oid(List *names, bool missing_ok);
 extern bool TSParserIsVisible(Oid prsId);
diff --git a/src/include/storage/standbydefs.h b/src/include/storage/standbydefs.h
index befdbf60bf..9a612a5834 100644
--- a/src/include/storage/standbydefs.h
+++ b/src/include/storage/standbydefs.h
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * standbydef.h
+ * standbydefs.h
  *	   Frontend exposed definitions for hot standby mode.
  *
  *
diff --git a/src/pl/plpython/plpy_subxactobject.c b/src/pl/plpython/plpy_subxactobject.c
index 53fd36edba..5dfb8a4cb5 100644
--- a/src/pl/plpython/plpy_subxactobject.c
+++ b/src/pl/plpython/plpy_subxactobject.c
@@ -132,7 +132,7 @@ PLy_subtransaction_enter(PyObject *self, PyObject *unused)
  *
  * Exit an explicit subtransaction. exc_type is an exception type, exc
  * is the exception object, tb is the traceback.  If exc_type is None,
- * commit the subtransactiony, if not abort it.
+ * commit the subtransaction, if not abort it.
  *
  * The method signature is chosen to allow subtransaction objects to
  * be used as context managers as described in
diff --git a/src/test/recovery/t/012_subtransactions.pl b/src/test/recovery/t/012_subtransactions.pl
index c184553694..292cd40fe2 100644
--- a/src/test/recovery/t/012_subtransactions.pl
+++ b/src/test/recovery/t/012_subtransactions.pl
@@ -76,7 +76,7 @@ is($psql_out, '6', "Check nextXid handling for prepared subtransactions");
 
 ###############################################################################
 # Check that replay will correctly set 2PC with more than
-# PGPROC_MAX_CACHED_SUBXIDS subtransations and also show data properly
+# PGPROC_MAX_CACHED_SUBXIDS subtransactions and also show data properly
 # on promotion
 ###############################################################################
 $node_master->psql('postgres', "DELETE FROM t_012_tbl");
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:
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 5fb1f1b7d7..3713dd2884 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -1797,7 +1797,7 @@ interpret_ident_response(const char *ident_response,
 /*
  *	Talk to the ident server on "remote_addr" and find out who
  *	owns the tcp connection to "local_addr"
- *	It the username successfully retrieved, check the usermap.
+ *	If the username successfully retrieved, check the usermap.
  *
  *	XXX: Using WaitLatchOrSocket() and doing a CHECK_FOR_INTERRUPTS() if the
  *	latch was set would improve the responsiveness to timeouts/cancellations.
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
index 8fc0a467f7..df7f271c10 100644
--- a/src/interfaces/ecpg/compatlib/informix.c
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -745,7 +745,7 @@ initValue(long lng_val)
 	return 0;
 }
 
-/* return the position oft the right-most dot in some string */
+/* return the position of the right-most dot in some string */
 static int
 getRightMostDot(const char *str)
 {

Reply via email to