0003-Rename-SetWalSummarizerLatch-function.patch
text/x-patch
Filename: 0003-Rename-SetWalSummarizerLatch-function.patch
Type: text/x-patch
Part: 2
Message:
Re: Interrupts vs signals
Patch
Format: format-patch
Series: patch 0003
Subject: Rename SetWalSummarizerLatch function
| File | + | − |
|---|---|---|
| src/backend/access/transam/xlog.c | 1 | 1 |
| src/backend/postmaster/walsummarizer.c | 2 | 2 |
| src/include/postmaster/walsummarizer.h | 1 | 1 |
From 140c8df21ef3b762a6748f1b4b1d8cbc08bf514e 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 03/11] 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 daa7909382..d23f38e24f 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