From 6bf294603c4fa3f23e29d953cd5af9b33ce28b36 Mon Sep 17 00:00:00 2001
From: Afrah Razzak <mypg.afrah@gmail.com>
Date: Mon, 19 Oct 2026 12:00:00 -0500
Subject: [PATCH] Fix typos in comments

Author: Afrah Razzak <mypg.afrah@gmail.com>
---
 contrib/pg_plan_advice/expected/semijoin.out | 2 +-
 contrib/pg_plan_advice/sql/semijoin.sql      | 2 +-
 src/backend/access/transam/xlog.c            | 2 +-
 src/bin/pg_dump/compress_lz4.c               | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/contrib/pg_plan_advice/expected/semijoin.out b/contrib/pg_plan_advice/expected/semijoin.out
index db6b069ec8e..63737ddc0ef 100644
--- a/contrib/pg_plan_advice/expected/semijoin.out
+++ b/contrib/pg_plan_advice/expected/semijoin.out
@@ -110,7 +110,7 @@ SELECT * FROM sj_narrow
    NO_GATHER(sj_narrow "*VALUES*")
 (11 rows)
 
--- Here, we expect advising a unique semijoin to swith to the same plan that
+-- Here, we expect advising a unique semijoin to switch to the same plan that
 -- we got with sj_wide, and advising a non-unique semijoin should not change
 -- the plan.
 BEGIN;
diff --git a/contrib/pg_plan_advice/sql/semijoin.sql b/contrib/pg_plan_advice/sql/semijoin.sql
index b4d503f67e3..844b3ea1085 100644
--- a/contrib/pg_plan_advice/sql/semijoin.sql
+++ b/contrib/pg_plan_advice/sql/semijoin.sql
@@ -48,7 +48,7 @@ EXPLAIN (COSTS OFF, PLAN_ADVICE)
 SELECT * FROM sj_narrow
 	WHERE (id, val1) IN (VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5));
 
--- Here, we expect advising a unique semijoin to swith to the same plan that
+-- Here, we expect advising a unique semijoin to switch to the same plan that
 -- we got with sj_wide, and advising a non-unique semijoin should not change
 -- the plan.
 BEGIN;
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 8636ad9ab2c..fd37ea4f607 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6266,7 +6266,7 @@ StartupXLOG(void)
 	 * checkpoint the same way a restartpoint horizon can.
 	 *
 	 * Never adopt over a state over the watermark or a node-local
-	 * pg_checksums change, it generats no WAL so nothing in the replayed WAL
+	 * pg_checksums change, it generates no WAL so nothing in the replayed WAL
 	 * could restore it once overwritten.  Otherwise, even a watermark above
 	 * the redo point must not prevent adoption.  A primary backup copies
 	 * pg_control after the relation files, which may still contain pages
diff --git a/src/bin/pg_dump/compress_lz4.c b/src/bin/pg_dump/compress_lz4.c
index a4ae1a4272f..b423ff4fe92 100644
--- a/src/bin/pg_dump/compress_lz4.c
+++ b/src/bin/pg_dump/compress_lz4.c
@@ -626,7 +626,7 @@ LZ4Stream_gets(char *ptr, int size, CompressFileHandle *CFH)
 	 * LZ4Stream_read_internal returning 0 or -1 means that it was either an
 	 * EOF or an error, but gets_func is defined to return NULL in either case
 	 * so we can treat both the same here. LZ4Stream_read_internal is expected
-	 * to have performed relevent error logging already.
+	 * to have performed relevant error logging already.
 	 */
 	if (ret <= 0)
 		return NULL;
-- 
2.39.3 (Apple Git-146)

