From 8eae424a9a76e14ddbc22ac6abb268ea2e3b6ce7 Mon Sep 17 00:00:00 2001
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: Sat, 24 Aug 2024 00:21:15 +0300
Subject: [PATCH v2 03/12] Rename SetWalSummarizerLatch function

The fact that it uses a latch for the wakeup is an implementation detail
---
 src/backend/access/transam/xlog.c      | 2 +-
 src/backend/postmaster/walsummarizer.c | 4 ++--
 src/include/postmaster/walsummarizer.h | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index ee0fb0e28f..45a4a40eca 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7268,7 +7268,7 @@ CreateCheckPoint(int flags)
 	 * until after the above call that flushes the XLOG_CHECKPOINT_ONLINE
 	 * record.
 	 */
-	SetWalSummarizerLatch();
+	WakeupWalSummarizer();
 
 	/*
 	 * Let smgr do post-checkpoint cleanup (eg, deleting old files).
diff --git a/src/backend/postmaster/walsummarizer.c b/src/backend/postmaster/walsummarizer.c
index c1bf4a70dd..3a407f8daa 100644
--- a/src/backend/postmaster/walsummarizer.c
+++ b/src/backend/postmaster/walsummarizer.c
@@ -626,7 +626,7 @@ GetOldestUnsummarizedLSN(TimeLineID *tli, bool *lsn_is_exact)
 }
 
 /*
- * Attempt to set the WAL summarizer's latch.
+ * Wake up the WAL summarizer process.
  *
  * This might not work, because there's no guarantee that the WAL summarizer
  * process was successfully started, and it also might have started but
@@ -634,7 +634,7 @@ GetOldestUnsummarizedLSN(TimeLineID *tli, bool *lsn_is_exact)
  * latch set, but there's no guarantee.
  */
 void
-SetWalSummarizerLatch(void)
+WakeupWalSummarizer(void)
 {
 	ProcNumber	pgprocno;
 
diff --git a/src/include/postmaster/walsummarizer.h b/src/include/postmaster/walsummarizer.h
index aedca55676..2642aa701d 100644
--- a/src/include/postmaster/walsummarizer.h
+++ b/src/include/postmaster/walsummarizer.h
@@ -29,7 +29,7 @@ extern void GetWalSummarizerState(TimeLineID *summarized_tli,
 								  int *summarizer_pid);
 extern XLogRecPtr GetOldestUnsummarizedLSN(TimeLineID *tli,
 										   bool *lsn_is_exact);
-extern void SetWalSummarizerLatch(void);
+extern void WakeupWalSummarizer(void);
 extern void WaitForWalSummarization(XLogRecPtr lsn);
 
 #endif
-- 
2.39.2

