diff --git a/doc/src/sgml/json.sgml b/doc/src/sgml/json.sgml
index 3068cf2d1ee370cbcc86892b1650fa2a08cd6051..5fd243974293717a1d1a2b8b0d9665d389344ce4 100644
--- a/doc/src/sgml/json.sgml
+++ b/doc/src/sgml/json.sgml
@@ -24,7 +24,7 @@
   There are two JSON data types: <type>json</> and <type>jsonb</>.
   Both accept <emphasis>almost</emphasis> identical sets of values as
   input.  The major practical difference is one of efficiency.  The
-  <type>json</> data type stores an exact copy of the the input text,
+  <type>json</> data type stores an exact copy of the input text,
   which processing functions must continually reparse, while
   <type>jsonb</> data is stored in a decomposed binary format that
   makes it slightly less efficient to input due to added serialization
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index 00c47cb313255b8b90de9691a7e6378dde3c1ee7..965b0e111840c1565e5981a3f5ffbbbd5900e65e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -169,7 +169,7 @@ CTRL-C
     </indexterm>
     <title>Logical Decoding</title>
     <para>
-     Logical decoding is the the process of extracting all persistent changes
+     Logical decoding is the process of extracting all persistent changes
      to a database's tables into a coherent, easy to understand format which
      can be interpreted without detailed knowledge of the database's internal
      state.
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index f9d6bf4ce53a3c0a6f42641d12772e125c4e6345..02cb5e50ab20b6a14c827ae3e901fabf8318b1be 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -1089,7 +1089,7 @@ begin:;
 	 * has progressed. There is a small fixed number of insertion locks,
 	 * determined by the num_xloginsert_locks GUC. When an inserter crosses a
 	 * page boundary, it updates the value stored in the lock to the how far it
-	 * has inserted, to allow the the previous buffer to be flushed.
+	 * has inserted, to allow the previous buffer to be flushed.
 	 *
 	 * Holding onto an insertion lock also protects RedoRecPtr and
 	 * fullPageWrites from changing until the insertion is finished.