diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index 34efac48651538abe8a6bf5a4b6a4cc8a2179ba1..fcdbfcea07b25ec9920ac14ada581c17e18d055f 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -1561,7 +1561,7 @@ socket_endcopyout(bool errorAbort)
 /*
  * On Windows, we need to set both idle and interval at the same time.
  * We also cannot reset them to the default (setting to zero will
- * actually set them to zero, not default), therefor we fallback to
+ * actually set them to zero, not default), therefore we fallback to
  * the out-of-the-box default instead.
  */
 #if defined(WIN32) && defined(SIO_KEEPALIVE_VALS)
diff --git a/src/backend/optimizer/geqo/geqo_erx.c b/src/backend/optimizer/geqo/geqo_erx.c
index 69ac0776160c0efac8c58ed08bd0c1fe691b1683..1a43ab7288c1dcaa43dc341ae30acb5d6893496a 100644
--- a/src/backend/optimizer/geqo/geqo_erx.c
+++ b/src/backend/optimizer/geqo/geqo_erx.c
@@ -138,7 +138,7 @@ gimme_edge_table(PlannerInfo *root, Gene *tour1, Gene *tour2,
  *	  registers edge from city1 to city2 in input edge table
  *
  *	  no assumptions about directionality are made;
- *	  therefor it is up to the calling routine to
+ *	  therefore it is up to the calling routine to
  *	  call gimme_edge twice to make a bi-directional edge
  *	  between city1 and city2;
  *	  uni-directional edges are possible as well (just call gimme_edge