From 27983e09660a0acc1792fdb3c250306445658f12 Mon Sep 17 00:00:00 2001
From: Imran Zaheer <imran.zhir@gmail.com>
Date: Thu, 4 Jun 2026 22:10:59 +0500
Subject: [PATCH v2] Update comments to refer to the correct functions

Commit 70e8186 split recovery-related code into xlogrecovery.c.

Update comments to refer to the relevant functions instead of the old
file locations.
---
 src/backend/access/transam/xact.c           | 16 ++++++++--------
 src/backend/access/transam/xlogprefetcher.c | 11 ++++++-----
 src/backend/postmaster/startup.c            |  4 ++--
 3 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 5586fbe5b07..de4cf96eaa2 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -6223,10 +6223,10 @@ xact_redo_commit(xl_xact_parsed_commit *parsed,
 		 * If a transaction completion record arrives that has as-yet
 		 * unobserved subtransactions then this will not have been fully
 		 * handled by the call to RecordKnownAssignedTransactionIds() in the
-		 * main recovery loop in xlog.c. So we need to do bookkeeping again to
-		 * cover that case. This is confusing and it is easy to think this
-		 * call is irrelevant, which has happened three times in development
-		 * already. Leave it in.
+		 * main recovery loop in PerformWalRecovery(). So we need to do
+		 * bookkeeping again to cover that case. This is confusing and it is
+		 * easy to think this call is irrelevant, which has happened three
+		 * times in development already. Leave it in.
 		 */
 		RecordKnownAssignedTransactionIds(max_xid);
 
@@ -6361,10 +6361,10 @@ xact_redo_abort(xl_xact_parsed_abort *parsed, TransactionId xid,
 		 * If a transaction completion record arrives that has as-yet
 		 * unobserved subtransactions then this will not have been fully
 		 * handled by the call to RecordKnownAssignedTransactionIds() in the
-		 * main recovery loop in xlog.c. So we need to do bookkeeping again to
-		 * cover that case. This is confusing and it is easy to think this
-		 * call is irrelevant, which has happened three times in development
-		 * already. Leave it in.
+		 * main recovery loop in PerformWalRecovery(). So we need to do
+		 * bookkeeping again to cover that case. This is confusing and it is
+		 * easy to think this call is irrelevant, which has happened three
+		 * times in development already. Leave it in.
 		 */
 		RecordKnownAssignedTransactionIds(max_xid);
 
diff --git a/src/backend/access/transam/xlogprefetcher.c b/src/backend/access/transam/xlogprefetcher.c
index 83a3f97a57c..1cfbbd04ddc 100644
--- a/src/backend/access/transam/xlogprefetcher.c
+++ b/src/backend/access/transam/xlogprefetcher.c
@@ -804,11 +804,12 @@ XLogPrefetcherNextBlock(uintptr_t pgsr_private, XLogRecPtr *lsn)
 
 		/*
 		 * Several callsites need to be able to read exactly one record
-		 * without any internal readahead.  Examples: xlog.c reading
-		 * checkpoint records with emode set to PANIC, which might otherwise
-		 * cause XLogPageRead() to panic on some future page, and xlog.c
-		 * determining where to start writing WAL next, which depends on the
-		 * contents of the reader's internal buffer after reading one record.
+		 * without any internal readahead.  Examples: PerformWalRecovery()
+		 * trying to read the first record that follows a checkpoint has emode
+		 * set to PANIC, which might otherwise cause XLogPageRead() to panic on
+		 * some future page, and FinishWalRecovery() determining where to start
+		 * writing WAL next, which depends on the contents of the reader's
+		 * internal buffer after reading one record.
 		 * Therefore, don't even think about prefetching until the first
 		 * record after XLogPrefetcherBeginRead() has been consumed.
 		 */
diff --git a/src/backend/postmaster/startup.c b/src/backend/postmaster/startup.c
index b46bac681fe..d91b7caac01 100644
--- a/src/backend/postmaster/startup.c
+++ b/src/backend/postmaster/startup.c
@@ -118,8 +118,8 @@ StartupProcShutdownHandler(SIGNAL_ARGS)
 /*
  * Re-read the config file.
  *
- * If one of the critical walreceiver options has changed, flag xlog.c
- * to restart it.
+ * If one of the critical walreceiver options has changed, request the startup
+ * process to restart the walreceiver.
  */
 static void
 StartupRereadConfig(void)
-- 
2.49.0

